Write Unity DOTS code faster with Systems, Components, & Jobs Snippets
See on Github »
Coding in Unity DOTS indroduces new boilerplate that needs to be remembered. From creating components, to shared components, to manged components referencing external resources—just to name a few—there is a lot of repetitive setup code when making each which becomes burdensome. However, this extension provides snippets for creating the boilerplate for most all scripts in Unity DOTS and will continue to expand. Instead of repeatedly typing the same lines 38 line setup for an ISystem with the additional start & stop callbacks, just type "dcsss" and start writting game code in seconds.
Command | Action |
---|---|
dcs | Create a Unity DOTS System with the ISystem interface |
dcsss | Create a Unity DOTS ISystem with onStartRunning & onStopRunning callbacks |
dcsb | Create a managed Unity DOTS System with the SystemBase class |
dcc | Create a Unity DOTS unmanaged component (recommended if using blittable types) |
dcmc | Create a Unity DOTS managed component (only if using NON-blittable types) |
dcmcer | Create a Unity DOTS managed component referencing an external resource |
dcsc | Create a Unity DOTS unmanaged shared component (for components used on many entities & with the same values) |
dcmsc | Create a Unity DOTS managed shared component (for shared components using non-blittable types) |
dcj | Create a Unity DOTS Job (no using Unity.Entities added with this command, for it is likely added to a System file & not standalone) |
dcb | Create a Unity DOTS component baker & its authoring monobehavior class |
dcbd | Create a Unity DOTS component baker referencing another data source (i.e. mesh, gameObject, scriptable obj...) |
dca | Create a Unity DOTS aspect (used to group related components) |
dcrc | Create a Unity Physics (the DOTS package) raycast. |
The commands above all begin with dc standing for "Dots Create ..." which means you can always just type dc and use the dropdown to find or read more about any command. For example, dcsc
stands for Dots Create Shared Component.
- Unity DOTS 1.0.11 and higher
Feel free to open a pr on the github repository any time to create new snippets that you want to see! Also if you are not familiar with creating snippets, open up an issue requesting a new snippet 🤝