Class TypeManager
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.
Namespace: Unity.Entities
Assembly: solution.dll
Syntax
public static class TypeManager
Fields
Name | Description |
---|---|
Baking |
Bitflag set for component types decorated with the Baking |
Buffer |
Bitflag set for component types inheriting from IBuffer |
Chunk |
Bitflag set for component types converted into Chunk Components. |
Cleanup |
Bitflag set for component types inheriting from ICleanup |
Cleanup |
Bitflag set for component types inheriting from ISystem |
Cleanup |
Bitflag set for component types inheriting from ICleanup |
Clear |
Bit mask to clear all flag bits from a Type |
Default |
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... |
Enableable |
Bitflag set for component types inheriting from IEnableable |
Has |
Bitflag set for component types with NativeContainer data Native |
Has |
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. |
IEquatable |
Bitflag set for component types inheriting from IEquatable<T>. |
IRef |
Bitflag set for component types inheriting from IRef |
Is |
Bitflag set if a component is not appropriate to be included in chunk serialization. |
Managed |
Bitflag set for component types requiring managed storage due to being a class type and/or containing managed references. |
Managed |
Bitflag set for component types inheriting from IShared |
Maximum |
Maximum number of Entity instances stored in a given Chunk/> |
Maximum |
Maximum platform alignment supported when aligning component data in a Chunk/> |
Maximum |
Maximum number of unique component types supported by the Type |
Object |
Offset into managed objects to read instance data |
Shared |
Bitflag set for component types inheriting from IShared |
System |
Obsolete. Use Cleanup |
System |
Obsolete. Use Cleanup |
Temporary |
Bitflag set for component types decorated with the Temporary |
Zero |
Bitflag set for component types which allocate 0 bytes in Chunk storage |
Properties
Name | Description |
---|---|
All |
Enumerable list of all component Type |
Methods
Name | Description |
---|---|
Calculate |
Calculate a hash for a component's full type name. Used at TypeManager initialization internally. |
Call |
Used by codegen |
Call |
Used by codegen |
Construct |
Used by codegen. Create an instance of a component type from a given buffer of data |
Construct |
Construct a System from a Type. Uses the same list in Get |
Construct |
Creates an instance of a system of type T. |
Construct |
Creates an instance of a system of System.Type. |
Equals(object, object, Type |
Compares two component instances to one another |
Equals(object, void*, Type |
Compares two component instances to one another |
Equals(void*, void*, Type |
Compares two component instances to one another |
Equals<T>(ref T, ref T) | Compares two component instances to one another |
Get |
Array of all component Type |
Get |
Returns how many component types are known to the Type |
Get |
Gets a pointer to entity offsets for a given type index. |
Get |
Retrieves a pre-calculated hash for a component's full type name. |
Get |
Generates a hash for a given component instance |
Get |
Generates a hash for a given component instance |
Get |
Generates a hash for a given component instance |
Get |
Used by codegen |
Get |
Used by codegen |
Get |
Get all the attribute objects of Type attributeType for a System. |
Get |
Retrieve the name of a system via its type. |
Get |
Retrives the name of a system via its system index. |
Get |
Retrieve type flags for a system index. |
Get |
Gets the System |
Get |
Returns the system index for System T. |
Get |
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. |
Get |
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. |
Get |
Gets the System.Type for the component represented by Type |
Get |
Gets the total number of components managed by the Type |
Get |
Fetches the TypeIndex for a given System.Type. |
Get |
Returns the TypeIndex for a given Stable |
Get |
Fetches the TypeIndex for a given T. |
Get |
Retrieve the TypeInfo for the Type |
Get |
Retrieve the TypeInfo for the component T. |
Get |
Used by codegen. Returns list of all type indices for components who have a WriteGroup on the provided type |
Get |
Retrieves a pointer to an array of WriteGroups for the provided TypeInfo. |
Has |
Returns if any component inherits from the provided Type |
Has |
|
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. |
Is |
Determines if an assembly refers to Unity.Entities.dll |
Is |
|
Is |
|
Is |
|
Is |
|
Is |
|
Is |
Used to determine if a component inherits from another component type |
Is |
|
Is |
|
Is |
|
Is |
|
Is |
|
Is |
|
Is |
|
Is |
Check if the provided type is a SystemGroup. |
Is |
Check if the provided type is a managed system. |
Is |
Obsolete. Use Is |
Is |
Obsolete. Use Is |
Is |
Determines if a given type is a System type (e.g. ISystem, SystemBase). |
Is |
|
Is |
|
Make |
Creates a new TypeIndex that allows the passed in 'typeindex' to be used as a chunk component. |
Register |
Register a UnityEngine.Object type with the TypeManager. |
Set |
Used by codegen |
Set |
Used by codegen |
Set |
Used by codegen |
Set |
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. |
Sort |
Sorts a list of system types based on rules defined via the ISystem |
Sort |
Sort the provided system type indices by their systems' CreateAfter and CreateBefore attributes, for the purposes of creating them in an order that respects said constraints. For use in implementing custom world creation, such as with ICustomBootstrap. |