Struct TypeIndex
Provides a unique id for component types as well as quick lookup information about the component type itself.
This value is fully deterministic at runtime but should not be considered deterministic across builds
and thus should not be serialized. For serialization, please prefer Stable
Namespace: Unity.Entities
Assembly: Unity.Entities.dll
Syntax
public struct TypeIndex
Fields
Name | Description |
---|---|
Value | Raw value used to identify Component types at runtime.
|
Properties
Name | Description |
---|---|
Flags | Type flags stored in Value |
Has |
The component type contains an Entity member. Entity members found in nested member types will also cause this property to return true. |
Has |
The component type contains a Native |
Index | Zero-based index for the Type |
Is |
The component type is decorated with the Baking |
Is |
The component type inherits from IBuffer |
Is |
The component type is used as a chunk component (a component mapped to a Chunk rather than Entity) |
Is |
The component type is appropriate for chunk serialization. Such types are blittable without containing pointer types or have been decorated with Chunk |
Is |
The component type inherits from ICleanup |
Is |
The component type inherits from ICleanup |
Is |
The component type inherits from ICleanup |
Is |
The component type inherits from IComponent |
Is |
The component type inherits from IEnableable |
Is |
The component type inherits from IEquatable<T> |
Is |
The component type Is |
Is |
The component type Is |
Is |
The component type requires managed storage due to being a class type, and/or contains reference types |
Is |
The component type inherits from IRef |
Is |
The component type inherits from IShared |
Is |
The component type is decorated with the Temporary |
Is |
The component type allocates 0 bytes in Chunk storage |
Null | An invalid Type |
Methods
Name | Description |
---|---|
Compare |
Compare this Type |
Equals(object) | Type |
Equals(Type |
Type |
Get |
A hash used for comparisons. |
To |
Provides a Burst compatible debugging string. |
To |
Provides a debugging string. |
Operators
Name | Description |
---|---|
operator ==(Type |
Type |
operator >(Type |
Evaluates if one Type |
operator >=(Type |
Evaluates if one Type |
implicit operator Type |
Implicit conversion from an int to a TypeIndex. |
implicit operator int(Type |
Implicit conversion from TypeIndex to an int. |
operator !=(Type |
Type |
operator <(Type |
Evaluates if one Type |
operator <=(Type |
Evaluates if one Type |