Class TypeManager
Inheritance
System.Object
TypeManager
Syntax
public static class TypeManager
Fields
BufferComponentTypeFlag
Declaration
public const int BufferComponentTypeFlag = 134217728
Field Value
Type |
Description |
System.Int32 |
|
ChunkComponentTypeFlag
Declaration
public const int ChunkComponentTypeFlag = 536870912
Field Value
Type |
Description |
System.Int32 |
|
ClearFlagsMask
Declaration
public const int ClearFlagsMask = 16777215
Field Value
Type |
Description |
System.Int32 |
|
HasNoEntityReferencesFlag
Declaration
public const int HasNoEntityReferencesFlag = 33554432
Field Value
Type |
Description |
System.Int32 |
|
MaximumChunkCapacity
Declaration
public const int MaximumChunkCapacity = 2147483647
Field Value
Type |
Description |
System.Int32 |
|
MaximumSupportedAlignment
Declaration
public const int MaximumSupportedAlignment = 16
Field Value
Type |
Description |
System.Int32 |
|
MaximumTypesCount
Declaration
public const int MaximumTypesCount = 10240
Field Value
Type |
Description |
System.Int32 |
|
ObjectOffset
Declaration
public static int ObjectOffset
Field Value
Type |
Description |
System.Int32 |
|
SharedComponentTypeFlag
Declaration
public const int SharedComponentTypeFlag = 268435456
Field Value
Type |
Description |
System.Int32 |
|
SystemStateSharedComponentTypeFlag
Declaration
public const int SystemStateSharedComponentTypeFlag = 335544320
Field Value
Type |
Description |
System.Int32 |
|
SystemStateTypeFlag
Declaration
public const int SystemStateTypeFlag = 67108864
Field Value
Type |
Description |
System.Int32 |
|
ZeroSizeInChunkTypeFlag
Declaration
public const int ZeroSizeInChunkTypeFlag = 1073741824
Field Value
Type |
Description |
System.Int32 |
|
Properties
AllTypes
Declaration
public static IEnumerable<TypeManager.TypeInfo> AllTypes { get; }
Property Value
SystemNames
Declaration
public static string[] SystemNames { get; }
Property Value
Type |
Description |
System.String[] |
|
Methods
CheckIsAllowedAsComponentData(Type, String)
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void CheckIsAllowedAsComponentData(Type type, string baseTypeDesc)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
System.String |
baseTypeDesc |
|
ChunkComponentToNormalTypeIndex(Int32)
Declaration
public static int ChunkComponentToNormalTypeIndex(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Int32 |
|
ConstructComponentFromBuffer(Int32, Void*)
Declaration
public static object ConstructComponentFromBuffer(int typeIndex, void *data)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
System.Void* |
data |
|
Returns
Type |
Description |
System.Object |
|
ConstructSystem(Type)
Construct a System from a Type. Uses the same list in GetSystems()
Declaration
public static ComponentSystemBase ConstructSystem(Type systemType)
Parameters
Type |
Name |
Description |
System.Type |
systemType |
|
Returns
ConstructSystem<T>()
Declaration
public static T ConstructSystem<T>()
where T : ComponentSystemBase
Returns
Type Parameters
ConstructSystem<T>(Type)
Declaration
public static T ConstructSystem<T>(Type systemType)
where T : ComponentSystemBase
Parameters
Type |
Name |
Description |
System.Type |
systemType |
|
Returns
Type Parameters
CreateTypeIndexForBufferElement<T>()
Declaration
public static int CreateTypeIndexForBufferElement<T>()
where T : struct, IBufferElementData
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
CreateTypeIndexForComponent<T>()
Declaration
public static int CreateTypeIndexForComponent<T>()
where T : struct, IComponentData
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
CreateTypeIndexForSharedComponent<T>()
Declaration
public static int CreateTypeIndexForSharedComponent<T>()
where T : struct, ISharedComponentData
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
Equals(Object, Object, Int32)
Declaration
public static bool Equals(object left, object right, int typeIndex)
Parameters
Type |
Name |
Description |
System.Object |
left |
|
System.Object |
right |
|
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Object, Void*, Int32)
Declaration
public static bool Equals(object left, void *right, int typeIndex)
Parameters
Type |
Name |
Description |
System.Object |
left |
|
System.Void* |
right |
|
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Void*, Void*, Int32)
Declaration
public static bool Equals(void *left, void *right, int typeIndex)
Parameters
Type |
Name |
Description |
System.Void* |
left |
|
System.Void* |
right |
|
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
Equals<T>(ref T, ref T)
Declaration
public static bool Equals<T>(ref T left, ref T right)
where T : struct
Parameters
Type |
Name |
Description |
T |
left |
|
T |
right |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
GetField(String)
Declaration
public static TypeManager.FieldInfo GetField(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
|
Returns
GetFieldArgs(Int32, Int32, Int32)
Declaration
public static TypeManager.FieldInfo GetFieldArgs(int arg0, int arg1, int arg2)
Parameters
Type |
Name |
Description |
System.Int32 |
arg0 |
|
System.Int32 |
arg1 |
|
System.Int32 |
arg2 |
|
Returns
GetHashCode(Object, Int32)
Declaration
public static int GetHashCode(object val, int typeIndex)
Parameters
Type |
Name |
Description |
System.Object |
val |
|
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Int32 |
|
GetHashCode(Void*, Int32)
Declaration
public static int GetHashCode(void *val, int typeIndex)
Parameters
Type |
Name |
Description |
System.Void* |
val |
|
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Int32 |
|
GetHashCode<T>(ref T)
Declaration
public static int GetHashCode<T>(ref T val)
where T : struct
Parameters
Type |
Name |
Description |
T |
val |
|
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
GetSystemAttributes(Type)
Get all the attribute objects for a System.
Declaration
public static Attribute[] GetSystemAttributes(Type systemType)
Parameters
Type |
Name |
Description |
System.Type |
systemType |
|
Returns
Type |
Description |
System.Attribute[] |
|
GetSystemAttributes(Type, Type)
Get all the attribute objects of Type attributeType for a System.
Declaration
public static Attribute[] GetSystemAttributes(Type systemType, Type attributeType)
Parameters
Type |
Name |
Description |
System.Type |
systemType |
|
System.Type |
attributeType |
|
Returns
Type |
Description |
System.Attribute[] |
|
GetSystems()
Return an array of all the Systems in use. (They are found
at compile time, and inserted by code generation.)
Declaration
public static Type[] GetSystems()
Returns
Type |
Description |
System.Type[] |
|
GetSystemTypeIndex(Type)
Declaration
public static int GetSystemTypeIndex(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
|
Returns
Type |
Description |
System.Int32 |
|
GetType(Int32)
Declaration
public static Type GetType(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Type |
|
GetTypeCount()
Declaration
public static int GetTypeCount()
Returns
Type |
Description |
System.Int32 |
|
GetTypeIndex(Type)
Declaration
public static int GetTypeIndex(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Returns
Type |
Description |
System.Int32 |
|
GetTypeIndex<T>()
Declaration
public static int GetTypeIndex<T>()
Returns
Type |
Description |
System.Int32 |
|
Type Parameters
GetTypeIndexFromStableTypeHash(UInt64)
Declaration
public static int GetTypeIndexFromStableTypeHash(ulong stableTypeHash)
Parameters
Type |
Name |
Description |
System.UInt64 |
stableTypeHash |
|
Returns
Type |
Description |
System.Int32 |
|
GetTypeInfo(Int32)
Declaration
public static TypeManager.TypeInfo GetTypeInfo(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
GetTypeInfo<T>()
Declaration
public static TypeManager.TypeInfo GetTypeInfo<T>()
where T : struct
Returns
Type Parameters
GetWriteGroupTypes(Int32)
Declaration
public static NativeArray<int> GetWriteGroupTypes(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
NativeArray<System.Int32> |
|
HasEntityReferences(Int32)
Declaration
public static bool HasEntityReferences(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
IgnoreDuplicateAdd(Int32)
Declaration
public static bool IgnoreDuplicateAdd(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
Initialize()
Initializes the TypeManager with all ECS type information. Additional calls without a matching Shutdown() simply increment the TypeManager ref-count and return
Declaration
public static int Initialize()
Returns
Type |
Description |
System.Int32 |
Returns the TypeManager ref-count. It is expected for each Initialize() call to be matched by a Shutdown() call.
|
IsAssemblyReferencingEntities(Assembly)
Declaration
public static bool IsAssemblyReferencingEntities(Assembly assembly)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
assembly |
|
Returns
Type |
Description |
System.Boolean |
|
IsAssemblyReferencingUnityEngine(Assembly)
Declaration
public static bool IsAssemblyReferencingUnityEngine(Assembly assembly)
Parameters
Type |
Name |
Description |
System.Reflection.Assembly |
assembly |
|
Returns
Type |
Description |
System.Boolean |
|
IsBuffer(Int32)
Declaration
public static bool IsBuffer(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
IsChunkComponent(Int32)
Declaration
public static bool IsChunkComponent(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
IsSharedComponent(Int32)
Declaration
public static bool IsSharedComponent(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
IsSystemAGroup(Type)
Declaration
public static bool IsSystemAGroup(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
|
Returns
Type |
Description |
System.Boolean |
|
IsSystemStateComponent(Int32)
Declaration
public static bool IsSystemStateComponent(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
IsSystemStateSharedComponent(Int32)
Declaration
public static bool IsSystemStateSharedComponent(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
IsZeroSized(Int32)
Declaration
public static bool IsZeroSized(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Boolean |
|
MakeChunkComponentTypeIndex(Int32)
Declaration
public static int MakeChunkComponentTypeIndex(int typeIndex)
Parameters
Type |
Name |
Description |
System.Int32 |
typeIndex |
|
Returns
Type |
Description |
System.Int32 |
|
RegisterUnityEngineComponentType(Type)
Declaration
public static void RegisterUnityEngineComponentType(Type type)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
Shutdown()
Removes all ECS type information and any allocated memory when the TypeManager ref-count == 1. That is,
the TypeManager will shutdown on the last call to Shutdown() matching the number of invocations of Initialize().
Declaration
public static int Shutdown()
Returns
Type |
Description |
System.Int32 |
Returns the TypeManager ref-count. It is expected for each Shutdown() call to match a previous Initialize() call.
|
SystemName(Type)
Declaration
public static string SystemName(Type t)
Parameters
Type |
Name |
Description |
System.Type |
t |
|
Returns
Type |
Description |
System.String |
|
ThrowOnDisallowedComponentData(Type, Type, String)
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void ThrowOnDisallowedComponentData(Type type, Type baseType, string baseTypeDesc)
Parameters
Type |
Name |
Description |
System.Type |
type |
|
System.Type |
baseType |
|
System.String |
baseTypeDesc |
|