Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
116 lines (94 sloc) 9.84 KB

Unity Data-Oriented Tech Stack Cheat Sheet

Here is a quick reference of the most useful classes, interfaces, structs, and attributes that have been introduced in this documentation by ECS, the C# Job System, and the Burst compiler.

ECS related

Name Namespace Type
ArchetypeChunk Unity.Entities Unsafe Struct
ComponentGroup Unity.Entities Unsafe Class
ComponentSystem Unity.Entities Abstract Class
ComponentType Unity.Entities Struct
DynamicBuffer Unity.Entities Unsafe Struct
Entity Unity.Entities Struct
EntityArchetype Unity.Entities Unsafe Struct
EntityCommandBuffer Unity.Entities Unsafe Struct
EntityManager Unity.Entities Unsafe Class
ExclusiveEntityTransaction Unity.Entities Unsafe Struct
IBufferElementData Unity.Entities Interface
IComponentData Unity.Entities Interface
IJobChunk Unity.Entities Interface
IJobNativeMultiHashMapMergedSharedKeyIndices Unity.Collections Interface
IJobParallelForBatch Unity.Jobs Interface
IJobParallelForFilter Unity.Jobs Interface
IJobForEach Unity.Entities Interface
ISharedComponentData Unity.Entities Interface
ISystemStateBufferElementData Unity.Entities Interface
ISystemStateComponentData Unity.Entities Interface
ISystemStateSharedComponentData Unity.Entities Interface
JobComponentSystem Unity.Entities Abstract Class
RenderMesh Unity.Rendering Class
NativeHashMap Unity.Collections Unsafe Struct
NativeList Unity.Collections Unsafe Struct
NativeMultiHashMap Unity.Collections Unsafe Struct
NativeQueue Unity.Collections Unsafe Struct
LocalToWorld Unity.Transforms Struct
Translation Unity.Transforms Struct
Rotation Unity.Transforms Struct
Scale Unity.Transforms Struct
World Unity.Entities Class

Unsafe attributes


Frequently used:

  • ENABLE_UNITY_COLLECTIONS_CHECKS: Wrap around validation code, for example bounds checking, parameter validation, or leak detection.
  • NET_DOTS: DOTS C# profile (vs full .NET) - for example, if you use Dictionary, you want #if !NET_DOTS; see Platform dependent compilation for the other NET_* defines
  • UNITY_DOTSPLAYER: Standalone DOTS (vs hybrid DOTS) - for example, if you use UnityEngine, you want #if !UNITY_DOTSPLAYER

Rarely used:

  • UNITY_DOTSPLAYER_DOTNET: Standalone DOTS built for real .NET execution target
  • UNITY_DOTSPLAYER_IL2CPP: Standalone DOTS built for IL2CPP - for example, where il2cpp provides an intrinsic for vs. an implementation using reflection in .NET

Note: The ZEROPLAYER defines are for the DOTS runtime, which has not been publicly released yet.

C# Job System related

Note: ECS code can also use the following objects, but they are part of the Unity codebase since 2018.1 and not part of any related packages. For more information, see the C# Job System manual.

Namespace Name Type
Unity.Collections NativeArray Struct
Unity.Collections NativeContainer Unsafe Class
Unity.Collections NativeSlice Struct
Unity.Jobs IJob Interface
Unity.Jobs IJobParallelFor Interface
Unity.Jobs JobHandle Interface
Unity.Jobs JobsUtility Unsafe Class


Burst compiler related


General computing terms

You can’t perform that action at this time.