Class TypeManager
Syntax
public static class TypeManager
Fields
BufferComponentTypeFlag
Declaration
public const int BufferComponentTypeFlag = 67108864
Field Value
ChunkComponentTypeFlag
Declaration
public const int ChunkComponentTypeFlag = 268435456
Field Value
ClearFlagsMask
Declaration
public const int ClearFlagsMask = 16777215
Field Value
HasNoEntityReferencesFlag
Declaration
public const int HasNoEntityReferencesFlag = 16777216
Field Value
ManagedComponentTypeFlag
Declaration
public const int ManagedComponentTypeFlag = 1073741824
Field Value
MaximumChunkCapacity
Declaration
public const int MaximumChunkCapacity = 2147483647
Field Value
MaximumSupportedAlignment
Declaration
public const int MaximumSupportedAlignment = 16
Field Value
MaximumTypesCount
Declaration
public const int MaximumTypesCount = 10240
Field Value
ObjectOffset
Declaration
public static int ObjectOffset
Field Value
SharedComponentTypeFlag
Declaration
public const int SharedComponentTypeFlag = 134217728
Field Value
SystemStateSharedComponentTypeFlag
Declaration
public const int SystemStateSharedComponentTypeFlag = 167772160
Field Value
SystemStateTypeFlag
Declaration
public const int SystemStateTypeFlag = 33554432
Field Value
ZeroSizeInChunkTypeFlag
Declaration
public const int ZeroSizeInChunkTypeFlag = 536870912
Field Value
Properties
AllTypes
Declaration
public static IEnumerable<TypeManager.TypeInfo> AllTypes { get; }
Property Value
SystemNames
Declaration
public static string[] SystemNames { get; }
Property Value
Methods
CheckIsAllowedAsComponentData(Type, String)
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void CheckIsAllowedAsComponentData(Type type, string baseTypeDesc)
Parameters
Type |
Name |
Description |
Type |
type |
|
String |
baseTypeDesc |
|
CheckIsAllowedAsManagedComponentData(Type, String)
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void CheckIsAllowedAsManagedComponentData(Type type, string baseTypeDesc)
Parameters
Type |
Name |
Description |
Type |
type |
|
String |
baseTypeDesc |
|
ChunkComponentToNormalTypeIndex(Int32)
Declaration
public static int ChunkComponentToNormalTypeIndex(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
ConstructComponentFromBuffer(Int32, Void*)
Declaration
public static object ConstructComponentFromBuffer(int typeIndex, void *data)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Void* |
data |
|
Returns
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 |
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 |
Type |
systemType |
|
Returns
Type Parameters
Equals(Object, Object, Int32)
Declaration
public static bool Equals(object left, object right, int typeIndex)
Parameters
Returns
Equals(Object, Void*, Int32)
Declaration
public static bool Equals(object left, void *right, int typeIndex)
Parameters
Returns
Equals(Void*, Void*, Int32)
Declaration
public static bool Equals(void *left, void *right, int typeIndex)
Parameters
Returns
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 Parameters
GetAllTypes()
Declaration
public static TypeManager.TypeInfo[] GetAllTypes()
Returns
GetEntityOffsets(Int32)
Declaration
public static TypeManager.EntityOffsetInfo*GetEntityOffsets(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
GetFastEqualityTypeInfo(TypeManager.TypeInfo)
Declaration
public static FastEquality.TypeInfo GetFastEqualityTypeInfo(TypeManager.TypeInfo typeInfo)
Parameters
Returns
GetField(String)
Declaration
public static TypeManager.FieldInfo GetField(string name)
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
GetFieldArgs(Int32, Int32, Int32)
Declaration
public static TypeManager.FieldInfo GetFieldArgs(int arg0, int arg1, int arg2)
Parameters
Returns
GetHashCode(Object, Int32)
Declaration
public static int GetHashCode(object val, int typeIndex)
Parameters
Returns
GetHashCode(Void*, Int32)
Declaration
public static int GetHashCode(void *val, int typeIndex)
Parameters
Type |
Name |
Description |
Void* |
val |
|
Int32 |
typeIndex |
|
Returns
GetHashCode<T>(ref T)
Declaration
public static int GetHashCode<T>(ref T val)
where T : struct
Parameters
Type |
Name |
Description |
T |
val |
|
Returns
Type Parameters
GetSystemAttributes(Type)
Get all the attribute objects for a System.
Declaration
public static Attribute[] GetSystemAttributes(Type systemType)
Parameters
Type |
Name |
Description |
Type |
systemType |
|
Returns
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 |
Type |
systemType |
|
Type |
attributeType |
|
Returns
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
GetSystemTypeIndex(Type)
Declaration
public static int GetSystemTypeIndex(Type t)
Parameters
Type |
Name |
Description |
Type |
t |
|
Returns
GetType(Int32)
Declaration
public static Type GetType(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
GetTypeCount()
Declaration
public static int GetTypeCount()
Returns
GetTypeIndex(Type)
Declaration
public static int GetTypeIndex(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
GetTypeIndex<T>()
Declaration
public static int GetTypeIndex<T>()
Returns
Type Parameters
GetTypeIndexFromStableTypeHash(UInt64)
Declaration
public static int GetTypeIndexFromStableTypeHash(ulong stableTypeHash)
Parameters
Type |
Name |
Description |
UInt64 |
stableTypeHash |
|
Returns
GetTypeInfo(Int32)
Declaration
public static TypeManager.TypeInfo GetTypeInfo(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
GetTypeInfo<T>()
Declaration
public static TypeManager.TypeInfo GetTypeInfo<T>()
Returns
Type Parameters
GetWriteGroupTypes(Int32)
Declaration
public static NativeArray<int> GetWriteGroupTypes(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
HasEntityReferences(Int32)
Declaration
public static bool HasEntityReferences(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
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.
Declaration
public static void Initialize()
IsAssemblyReferencingEntities(Assembly)
Declaration
public static bool IsAssemblyReferencingEntities(Assembly assembly)
Parameters
Returns
IsAssemblyReferencingUnityEngine(Assembly)
Declaration
public static bool IsAssemblyReferencingUnityEngine(Assembly assembly)
Parameters
Returns
IsBuffer(Int32)
Declaration
public static bool IsBuffer(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
IsChunkComponent(Int32)
Declaration
public static bool IsChunkComponent(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
IsManagedComponent(Int32)
Declaration
public static bool IsManagedComponent(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
IsSharedComponent(Int32)
Declaration
public static bool IsSharedComponent(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
IsSystemAGroup(Type)
Declaration
public static bool IsSystemAGroup(Type t)
Parameters
Type |
Name |
Description |
Type |
t |
|
Returns
IsSystemStateComponent(Int32)
Declaration
public static bool IsSystemStateComponent(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
IsSystemStateSharedComponent(Int32)
Declaration
public static bool IsSystemStateSharedComponent(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
IsZeroSized(Int32)
Declaration
public static bool IsZeroSized(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
MakeChunkComponentTypeIndex(Int32)
Declaration
public static int MakeChunkComponentTypeIndex(int typeIndex)
Parameters
Type |
Name |
Description |
Int32 |
typeIndex |
|
Returns
RegisterUnityEngineObjectType(Type)
Declaration
public static void RegisterUnityEngineObjectType(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Shutdown()
Removes all ECS type information and any allocated memory. May only be called once globally, and must be
called from the main thread.
Declaration
public static void Shutdown()
SystemName(Type)
Declaration
public static string SystemName(Type t)
Parameters
Type |
Name |
Description |
Type |
t |
|
Returns
ThrowOnDisallowedComponentData(Type, Type, String)
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void ThrowOnDisallowedComponentData(Type type, Type baseType, string baseTypeDesc)
Parameters
ThrowOnDisallowedManagedComponentData(Type, Type, String)
Declaration
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void ThrowOnDisallowedManagedComponentData(Type type, Type baseType, string baseTypeDesc)
Parameters