The TypeManager registers all Components and Systems available at runtime. Information about components and systems can be retrieved at runtime via static methods on TypeManager. The Initialize() method must be invoked before the TypeManager can be used.
| Property | Description |
|---|---|
| AllTypes | Enumerable list of all component TypeInfo values. |
| BakingOnlyTypeFlag | Bitflag set for component types decorated with the BakingTypeAttribute attribute. |
| BufferComponentTypeFlag | Bitflag set for component types inheriting from IBufferElementData. |
| ChunkComponentTypeFlag | Bitflag set for component types converted into Chunk Components. |
| CleanupBufferComponentTypeFlag | Bitflag set for component types inheriting from ICleanupBufferElementData. |
| CleanupComponentTypeFlag | Bitflag set for component types inheriting from ISystemStateComponentData. |
| CleanupSharedComponentTypeFlag | Bitflag set for component types inheriting from ICleanupSharedComponentData. |
| ClearFlagsMask | Bit mask to clear all flag bits from a TypeIndex /> |
| DefaultBufferCapacityNumerator | BufferCapacity is by default calculated as DefaultBufferCapacityNumerator / sizeof(BufferElementDataType) thus for a 1 byte component, the maximum number of elements possible to be stored in chunk memory before the buffer is allocated separately from chunk data, is DefaultBufferCapacityNumerator elements. For a 2 byte sized component, (DefaultBufferCapacityNumerator / 2) elements can be stored, etc... |
| EnableableComponentFlag | Bitflag set for component types inheriting from IEnableableComponent. |
| HasNativeContainerFlag | Bitflag set for component types with NativeContainer data NativeContainerAttribute. |
| HasNoEntityReferencesFlag | Bitflag set for component types that do not contain an Entity member. Entity members found in nested member types will cause this bitflag to not be set. |
| HasOnAddedCallbackFlag | Bitflag set for component types which have an OnAdded callback |
| HasOnRemovedCallbackFlag | Bitflag set for component types which have an OnRemoved callback |
| IEquatableTypeFlag | Bitflag set for component types inheriting from IEquatable_1. |
| IRefCountedComponentFlag | Bitflag set for component types inheriting from IRefCounted. |
| IsNotChunkSerializableTypeFlag | Bitflag set if a component is not appropriate to be included in chunk serialization. |
| ManagedComponentTypeFlag | Bitflag set for component types requiring managed storage due to being a class type and/or containing managed references. |
| ManagedSharedComponentTypeFlag | Bitflag set for component types inheriting from ISharedComponentData and requiring managed storage due to containing managed references. |
| MaximumChunkCapacity | Maximum number of Entity instances stored in a given Unity.Entities.Chunk/> |
| MaximumSupportedAlignment | Maximum platform alignment supported when aligning component data in a Unity.Entities.Chunk/> |
| MaximumTypesCount | Maximum number of unique component types supported by the TypeManager/> |
| ObjectOffset | Offset into managed objects to read instance data |
| SharedComponentTypeFlag | Bitflag set for component types inheriting from ISharedComponentData. |
| TemporaryBakingTypeFlag | Bitflag set for component types decorated with the TemporaryBakingTypeAttribute attribute. |
| TransformComponentTypeFlag | Bitflag set for component types that represent a transform/>. |
| ZeroSizeInChunkTypeFlag | Bitflag set for component types which allocate 0 bytes in Chunk storage |
| Method | Description |
|---|---|
| CalculateFullNameHash | Calculate a hash for a component's full type name. Used at TypeManager initialization internally. |
| CallIRefCounted_Release | Used by codegen |
| CallIRefCounted_Retain | Used by codegen |
| ConstructComponentFromBuffer | Used by codegen. Create an instance of a component type from a given buffer of data |
| ConstructSystem | Construct a System from a Type. Uses the same list in TypeManager.GetSystems. |
| Equals | Compares two component instances to one another |
| GetDescendantCount | Returns how many component types are known to the TypeManager that inherit from a given component type |
| GetEntityOffsets | Gets a pointer to entity offsets for a given type index. |
| GetFullNameHash | Retrieves a pre-calculated hash for a component's full type name. |
| GetHashCode | Generates a hash for a given component instance |
| GetIEquatable_EqualsFn | Used by codegen |
| GetIEquatable_GetHashCodeFn | Used by codegen |
| GetSystemAttributes | Obtains a list containing the SystemAttributes for a system. This allows for access to the attributes which were put on the system. |
| GetSystemName | Retrieve the name of a system via its type. |
| GetSystems | Return an array of all System types available to the runtime matching the WorldSystemFilterFlags. By default, all systems available to the runtime is returned. Prefer GetSystemTypeIndices over this to avoid unnecessary reflection. |
| GetSystemType | Gets the Type for a system from its SystemTypeIndex. |
| GetSystemTypeFlags | Retrieve type flags for a system index. |
| GetSystemTypeIndex | Returns the system index for System T. |
| GetSystemTypeIndices | Return an array of all System types available to the runtime matching the WorldSystemFilterFlags. By default, all systems available to the runtime is returned. This version avoids unnecessary reflection. |
| GetType | Gets the System.Type for the component represented by TypeIndex. |
| GetTypeCount | Gets the total number of components managed by the TypeManager. |
| GetTypeIndex | Fetches the TypeIndex for a given T. |
| GetTypeIndexFromStableTypeHash | Returns the TypeIndex for a given TypeManager.TypeInfo.StableTypeHash |
| GetTypeInfo | Retrieve the TypeInfo for the TypeIndex. |
| HasDescendants | Returns if any component inherits from the provided TypeIndex |
| HasEntityReferences | TypeIndex.HasEntityReferences |
| Initialize | Initializes the TypeManager with all ECS type information. May be called multiple times; only the first call will do any work. Always must be called from the main thread. |
| InitializePendingLifecycleCallbacks | Processes any lifecycle callbacks that were registered before TypeManager was initialized. Called from EntityManager.Initialize() after TypeManager.Initialize(). |
| IsAssemblyReferencingEntities | Determines if an assembly refers to Unity.Entities.dll |
| IsBakingOnlyType | TypeIndex.IsBakingOnlyType |
| IsBuffer | TypeIndex.IsBuffer |
| IsChunkComponent | TypeIndex.IsChunkComponent |
| IsCleanupComponent | TypeIndex.IsCleanupComponent |
| IsCleanupSharedComponent | TypeIndex.IsCleanupSharedComponent |
| IsDescendantOf | Used to determine if a component inherits from another component type |
| IsEnableable | TypeIndex.IsEnableable |
| IsEnableableType | TypeIndex.IsEnableable |
| IsIEquatable | TypeIndex.IsIEquatable |
| IsSharedComponentType | TypeIndex.IsSharedComponentType |
| IsSystemAGroup | Check if the provided type is a SystemGroup. |
| IsSystemManaged | Check if the provided type is a managed system. |
| IsSystemType | Determines if a given type is a System type (e.g. ISystem, SystemBase). |
| IsTemporaryBakingType | TypeIndex.IsTemporaryBakingType |
| IsTransform | TypeIndex.IsTransform |
| IsZeroSized | TypeIndex.IsZeroSized |
| MakeChunkComponentTypeIndex | Creates a new TypeIndex that allows the passed in 'typeindex' to be used as a chunk component. |
| RegisterComponentLifecycleCallback | Used by ILPP-generated code to register component lifecycle callbacks. Called from generated EarlyInit() methods. |
| RegisterUnityEngineObjectType | Register a UnityEngine.Object type with the TypeManager. |
| SetIEquatable_EqualsFn | Used by codegen |
| SetIEquatable_GetHashCodeFn | Used by codegen |
| SetIRefCounted_ReleaseFn | Used by codegen |
| SetIRefCounted_RetainFn | Used by codegen |
| Shutdown | Removes all ECS type information and any allocated memory. May only be called once globally, and must be called from the main thread. |
| SortSystemTypesInCreationOrder | Sorts a list of system types based on rules defined via the Unity.Entities.ISystemOrderAttribute's. CreateBeforeAttribute and CreateAfterAttribute. |
| Delegate | Description |
|---|---|
| ComponentLifecycleDelegate | Delegate type for component lifecycle callbacks (IDebugOnAdded/IDebugOnRemoved). Used by ILPP-generated wrapper code. |