|
| 1 | +# ECS Cheat Sheet |
| 2 | + |
| 3 | +Here is a quick reference of the common classes, interfaces, structs, and attributes that have been introduced in this documentation by [ECS](#ecs-related), [Burst compiler](#burst-compiler-related) and the [C# job system](#c#-job-system-related). Click the links below for more information from the Unity Manual and Scripting API. |
| 4 | + |
| 5 | +> Note: This is not an exhaustive list and can be added to over time as ECS, and its related documentation, expands. Check the ECSJobDemo code and the [Scripting API]() under the namespaces mentioned below for more examples. |
| 6 | +
|
| 7 | +## C# job system related |
| 8 | + |
| 9 | +> Note: These can also be used by ECS code, but they are part of the main Unity 2018.1 release and not part of the ECS packages. |
| 10 | +
|
| 11 | +| Namespace | Name | Type | |
| 12 | +| :-------------: |:-------------:| :-----:| |
| 13 | +| Unity.Collections | [NativeArray](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.NativeArray_1.html) | Struct | |
| 14 | +| Unity.Collections | [NativeContainer](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerAttribute.html) | Unsafe Class | |
| 15 | +| Unity.Collections | [NativeSlice](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.NativeSlice_1.html) | Struct | |
| 16 | +| Unity.Jobs | [IJob](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Jobs.IJob.html) | Interface | |
| 17 | +| Unity.Jobs | [IJobParallelFor](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Jobs.IJobParallelFor.html) | Interface | |
| 18 | +| Unity.Jobs | [JobHandle](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Jobs.JobHandle.html) | Interface | |
| 19 | +| Unity.Jobs | [JobsUtility](https://docs.unity3d.com/es/2018.1/ScriptReference/Unity.Jobs.LowLevel.Unsafe.JobsUtility.html) | Unsafe Class | |
| 20 | + |
| 21 | +### Attributes |
| 22 | + |
| 23 | +* [[ReadOnly]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.ReadOnlyAttribute.html) |
| 24 | +* [[WriteOnly]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.WriteOnlyAttribute.html) |
| 25 | + |
| 26 | +## ECS related |
| 27 | + |
| 28 | +| Namespace | Name | Type | |
| 29 | +| :-------------: |:-------------:| :-----:| |
| 30 | +| Unity.Collections | [NativeHashMap](../../ECSJobDemos/Packages/com.unity.collections/Unity.Collections/NativeHashMap.cs) | Unsafe Struct | |
| 31 | +| Unity.Collections | [NativeList](../../ECSJobDemos/Packages/com.unity.collections/Unity.Collections/NativeList.cs) | Unsafe Struct | |
| 32 | +| Unity.Collections | [NativeQueue](../../ECSJobDemos/Packages/com.unity.collections/Unity.Collections/NativeQueue.cs) | Unsafe Struct | |
| 33 | +| Unity.Entities | [ComponentDataArray](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/Iterators/ComponentDataArray.cs) | Unsafe Struct | |
| 34 | +| Unity.Entities | [ComponentDataFromEntity](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/Iterators/ComponentDataFromEntity.cs) | Unsafe Struct | |
| 35 | +| Unity.Entities | [ComponentGroup](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/Iterators/ComponentGroup.cs) | Unsafe Class | |
| 36 | +| Unity.Entities | [ComponentSystem](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/ComponentSystem.cs) - [ECS Docs](./getting_started.md#what-is-ecs?) | Abstract Class | |
| 37 | +| Unity.Entities | [ComponentType](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/Types/ComponentType.cs) | Struct | |
| 38 | +| Unity.Entities | [Entity](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/EntityManager.cs) | Struct | |
| 39 | +| Unity.Entities | [EntityArchetype](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/EntityManager.cs) | Unsafe Struct | |
| 40 | +| Unity.Entities | [EntityCommandBuffer](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/EntityCommandBuffer.cs) | Unsafe Struct | |
| 41 | +| Unity.Entities | [EntityManager](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/EntityManager.cs) | Unsafe Class | |
| 42 | +| Unity.Entities | [ExclusiveEntityTransaction](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/ExclusiveEntityTransaction.cs) | Unsafe Struct | |
| 43 | +| Unity.Entities | [GameObjectEntity](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities.Hybrid/GameObjectEntity.cs) | Class | |
| 44 | +| Unity.Entities | [IComponentData](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/IComponentData.cs) - [ECS Docs](./ecs_in_detail.md#icomponentdata) | Interface | |
| 45 | +| Unity.Entities | [IJobProcessComponentData](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/IJobProcessComponentData.cs) | Interface | |
| 46 | +| Unity.Entities | [ISharedComponentData](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/IComponentData.cs) - [ECS Docs](./ecs_in_detail.md#shared-componentdata) | Interface | |
| 47 | +| Unity.Entities | [JobComponentSystem](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/ComponentSystem.cs) | Abstract Class | |
| 48 | +| Unity.Entities | [World](../../ECSJobDemos/Packages/com.unity.entities/Unity.Entities/Injection/World.cs) | Class | |
| 49 | +| Unity.Jobs | [IJobParallelForBatch](../../ECSJobDemos/Packages/com.unity.jobs/Unity.Jobs/IJobParallelForBatch.cs) | Interface | |
| 50 | +| Unity.Jobs | [IJobParallelForFilter](../../ECSJobDemos/Packages/com.unity.jobs/Unity.Jobs/IJobParallelForFilter.cs) | Interface | |
| 51 | +| Unity.Rendering | [MeshInstanceRendererComponent](../../ECSJobDemos/Packages/com.unity.entities/Unity.Rendering.Hybrid/MeshInstanceRendererComponent.cs) | Class | |
| 52 | +| Unity.Transforms | [PositionComponent](../../ECSJobDemos/Packages/com.unity.entities/Unity.Transforms/PositionComponent.cs) | Class | |
| 53 | +| Unity.Transforms | [CopyInitialTransformFromGameObjectComponent](../../ECSJobDemos/Packages/com.unity.entities/Unity.Transforms.Hybrid/CopyInitialTransformFromGameObjectComponent.cs) | Class | |
| 54 | +| Unity.Transforms | [TransformMatrixComponent](../../ECSJobDemos/Packages/com.unity.entities/Unity.Transforms/TransformMatrixComponent.cs) | Class | |
| 55 | + |
| 56 | +### Attributes |
| 57 | + |
| 58 | +* [Inject] |
| 59 | + |
| 60 | +#### Unsafe attributes |
| 61 | + |
| 62 | +* [[NativeContainer]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerAttribute.html) |
| 63 | +* [[NativeContainerIsAtomicWriteOnly]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerIsAtomicWriteOnlyAttribute.html) |
| 64 | +* [[NativeContainerSupportsMinMaxWriteRestriction]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerSupportsMinMaxWriteRestrictionAttribute.html) |
| 65 | +* [[NativeContainerNeedsThreadIndex]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerNeedsThreadIndexAttribute.html) |
| 66 | +* [[NativeContainerSupportsDeallocateOnJobCompletion]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeContainerSupportsDeallocateOnJobCompletionAttribute.html) |
| 67 | +* [[NativeDisableUnsafePtrRestriction]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeDisableUnsafePtrRestrictionAttribute.html) |
| 68 | +* [[NativeSetClassTypeToNullOnSchedule]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Collections.LowLevel.Unsafe.NativeSetClassTypeToNullOnScheduleAttribute.html) |
| 69 | + |
| 70 | +### Other |
| 71 | + |
| 72 | +* \#if ENABLE_UNITY_COLLECTIONS_CHECKS ... #endif |
| 73 | + |
| 74 | +## Burst compiler related |
| 75 | + |
| 76 | +### Attributes |
| 77 | + |
| 78 | +* [[BurstDiscard]](https://docs.unity3d.com/2018.1/Documentation/ScriptReference/Unity.Burst.BurstDiscardAttribute.html) |
| 79 | +* [ComputeJobOptimization] |
0 commit comments