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.
ECS Snippets In Action
Create a Unity DOTS System with the ISystem interface
Create a Unity DOTS ISystem with onStartRunning & onStopRunning callbacks
Create a managed Unity DOTS System with the SystemBase class
Create a Unity DOTS unmanaged component (recommended if using blittable types)
Create a Unity DOTS managed component (only if using NON-blittable types)
Create a Unity DOTS managed component referencing an external resource
Create a Unity DOTS unmanaged shared component (for components used on many entities & with the same values)
Create a Unity DOTS managed shared component (for shared components using non-blittable types)
Create a Unity DOTS Job (no using Unity.Entities added with this command, for it is likely added to a System file & not standalone)
Create a Unity DOTS component baker & its authoring monobehavior class
Create a Unity DOTS component baker referencing another data source (i.e. mesh, gameObject, scriptable obj...)
Create a Unity DOTS aspect (used to group related components)
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.
Supported Version of Unity DOTS
Unity DOTS 1.0.11 (The current production release as of July 2023)
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 🤝