Class TypeManager | Entities | 0.10.0-preview.6
docs.unity3d.com
    Show / Hide Table of Contents

    Class TypeManager

    Inheritance
    Object
    TypeManager
    Namespace: Unity.Entities
    Syntax
    public static class TypeManager

    Fields

    BufferComponentTypeFlag

    Declaration
    public const int BufferComponentTypeFlag = 67108864
    Field Value
    Type Description
    Int32

    ChunkComponentTypeFlag

    Declaration
    public const int ChunkComponentTypeFlag = 536870912
    Field Value
    Type Description
    Int32

    ClearFlagsMask

    Declaration
    public const int ClearFlagsMask = 16777215
    Field Value
    Type Description
    Int32

    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...

    Declaration
    public const int DefaultBufferCapacityNumerator = 128
    Field Value
    Type Description
    Int32

    HasNoEntityReferencesFlag

    Declaration
    public const int HasNoEntityReferencesFlag = 16777216
    Field Value
    Type Description
    Int32

    ManagedComponentTypeFlag

    Declaration
    public const int ManagedComponentTypeFlag = 268435456
    Field Value
    Type Description
    Int32

    MaximumChunkCapacity

    Declaration
    public const int MaximumChunkCapacity = 2147483647
    Field Value
    Type Description
    Int32

    MaximumSupportedAlignment

    Declaration
    public const int MaximumSupportedAlignment = 16
    Field Value
    Type Description
    Int32

    MaximumTypesCount

    Declaration
    public const int MaximumTypesCount = 10240
    Field Value
    Type Description
    Int32

    ObjectOffset

    Declaration
    public static int ObjectOffset
    Field Value
    Type Description
    Int32

    SharedComponentTypeFlag

    Declaration
    public const int SharedComponentTypeFlag = 134217728
    Field Value
    Type Description
    Int32

    SystemStateSharedComponentTypeFlag

    Declaration
    public const int SystemStateSharedComponentTypeFlag = 167772160
    Field Value
    Type Description
    Int32

    SystemStateTypeFlag

    Declaration
    public const int SystemStateTypeFlag = 33554432
    Field Value
    Type Description
    Int32

    ZeroSizeInChunkTypeFlag

    Declaration
    public const int ZeroSizeInChunkTypeFlag = 1073741824
    Field Value
    Type Description
    Int32

    Properties

    AllTypes

    Declaration
    public static IEnumerable<TypeManager.TypeInfo> AllTypes { get; }
    Property Value
    Type Description
    IEnumerable<TypeManager.TypeInfo>

    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

    ConstructComponentFromBuffer(Int32, Void*)

    Declaration
    public static object ConstructComponentFromBuffer(int typeIndex, void *data)
    Parameters
    Type Name Description
    Int32 typeIndex
    Void* data
    Returns
    Type Description
    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
    Type systemType
    Returns
    Type Description
    ComponentSystemBase

    ConstructSystem<T>()

    Declaration
    public static T ConstructSystem<T>()
        where T : ComponentSystemBase
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    ConstructSystem<T>(Type)

    Declaration
    public static T ConstructSystem<T>(Type systemType)
        where T : ComponentSystemBase
    Parameters
    Type Name Description
    Type systemType
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Equals(Object, Object, Int32)

    Declaration
    public static bool Equals(object left, object right, int typeIndex)
    Parameters
    Type Name Description
    Object left
    Object right
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    Equals(Object, Void*, Int32)

    Declaration
    public static bool Equals(object left, void *right, int typeIndex)
    Parameters
    Type Name Description
    Object left
    Void* right
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    Equals(Void*, Void*, Int32)

    Declaration
    public static bool Equals(void *left, void *right, int typeIndex)
    Parameters
    Type Name Description
    Void* left
    Void* right
    Int32 typeIndex
    Returns
    Type Description
    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
    Boolean
    Type Parameters
    Name Description
    T

    GetAllTypes()

    Declaration
    public static TypeManager.TypeInfo[] GetAllTypes()
    Returns
    Type Description
    TypeManager.TypeInfo[]

    GetEntityOffsets(Int32)

    Declaration
    public static TypeManager.EntityOffsetInfo*GetEntityOffsets(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    TypeManager.EntityOffsetInfo*

    GetFastEqualityTypeInfo(TypeManager.TypeInfo)

    Declaration
    public static FastEquality.TypeInfo GetFastEqualityTypeInfo(TypeManager.TypeInfo typeInfo)
    Parameters
    Type Name Description
    TypeManager.TypeInfo typeInfo
    Returns
    Type Description
    FastEquality.TypeInfo

    GetHashCode(Object, Int32)

    Declaration
    public static int GetHashCode(object val, int typeIndex)
    Parameters
    Type Name Description
    Object val
    Int32 typeIndex
    Returns
    Type Description
    Int32

    GetHashCode(Void*, Int32)

    Declaration
    public static int GetHashCode(void *val, int typeIndex)
    Parameters
    Type Name Description
    Void* val
    Int32 typeIndex
    Returns
    Type Description
    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
    Int32
    Type Parameters
    Name Description
    T

    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
    Type Description
    Attribute[]

    GetSystemName(Type)

    Declaration
    public static string GetSystemName(Type t)
    Parameters
    Type Name Description
    Type t
    Returns
    Type Description
    String

    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
    Type[]

    GetSystemTypeIndex(Type)

    Declaration
    public static int GetSystemTypeIndex(Type t)
    Parameters
    Type Name Description
    Type t
    Returns
    Type Description
    Int32

    GetType(Int32)

    Declaration
    public static Type GetType(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Type

    GetTypeCount()

    Declaration
    public static int GetTypeCount()
    Returns
    Type Description
    Int32

    GetTypeIndex(Type)

    Declaration
    public static int GetTypeIndex(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    Int32

    GetTypeIndex<T>()

    Declaration
    public static int GetTypeIndex<T>()
    Returns
    Type Description
    Int32
    Type Parameters
    Name Description
    T

    GetTypeIndexFromStableTypeHash(UInt64)

    Declaration
    public static int GetTypeIndexFromStableTypeHash(ulong stableTypeHash)
    Parameters
    Type Name Description
    UInt64 stableTypeHash
    Returns
    Type Description
    Int32

    GetTypeInfo(Int32)

    Declaration
    public static TypeManager.TypeInfo GetTypeInfo(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    TypeManager.TypeInfo

    GetTypeInfo<T>()

    Declaration
    public static TypeManager.TypeInfo GetTypeInfo<T>()
    Returns
    Type Description
    TypeManager.TypeInfo
    Type Parameters
    Name Description
    T

    GetWriteGroupTypes(Int32)

    Declaration
    public static NativeArray<int> GetWriteGroupTypes(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    NativeArray<Int32>

    HasEntityReferences(Int32)

    Declaration
    public static bool HasEntityReferences(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    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
    Type Name Description
    Assembly assembly
    Returns
    Type Description
    Boolean

    IsAssemblyReferencingUnityEngine(Assembly)

    Declaration
    public static bool IsAssemblyReferencingUnityEngine(Assembly assembly)
    Parameters
    Type Name Description
    Assembly assembly
    Returns
    Type Description
    Boolean

    IsBuffer(Int32)

    Declaration
    public static bool IsBuffer(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    IsChunkComponent(Int32)

    Declaration
    public static bool IsChunkComponent(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    IsManagedComponent(Int32)

    Declaration
    public static bool IsManagedComponent(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    IsSharedComponent(Int32)

    Declaration
    public static bool IsSharedComponent(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    IsSystemAGroup(Type)

    Declaration
    public static bool IsSystemAGroup(Type t)
    Parameters
    Type Name Description
    Type t
    Returns
    Type Description
    Boolean

    IsSystemStateComponent(Int32)

    Declaration
    public static bool IsSystemStateComponent(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    IsSystemStateSharedComponent(Int32)

    Declaration
    public static bool IsSystemStateSharedComponent(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    IsZeroSized(Int32)

    Declaration
    public static bool IsZeroSized(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Boolean

    MakeChunkComponentTypeIndex(Int32)

    Declaration
    public static int MakeChunkComponentTypeIndex(int typeIndex)
    Parameters
    Type Name Description
    Int32 typeIndex
    Returns
    Type Description
    Int32

    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()

    ThrowOnDisallowedComponentData(Type, Type, String)

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public static void ThrowOnDisallowedComponentData(Type type, Type baseType, string baseTypeDesc)
    Parameters
    Type Name Description
    Type type
    Type baseType
    String baseTypeDesc

    ThrowOnDisallowedManagedComponentData(Type, Type, String)

    Declaration
    [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
    public static void ThrowOnDisallowedManagedComponentData(Type type, Type baseType, string baseTypeDesc)
    Parameters
    Type Name Description
    Type type
    Type baseType
    String baseTypeDesc
    In This Article
    • Fields
      • BufferComponentTypeFlag
      • ChunkComponentTypeFlag
      • ClearFlagsMask
      • DefaultBufferCapacityNumerator
      • HasNoEntityReferencesFlag
      • ManagedComponentTypeFlag
      • MaximumChunkCapacity
      • MaximumSupportedAlignment
      • MaximumTypesCount
      • ObjectOffset
      • SharedComponentTypeFlag
      • SystemStateSharedComponentTypeFlag
      • SystemStateTypeFlag
      • ZeroSizeInChunkTypeFlag
    • Properties
      • AllTypes
    • Methods
      • CheckIsAllowedAsComponentData(Type, String)
      • CheckIsAllowedAsManagedComponentData(Type, String)
      • ConstructComponentFromBuffer(Int32, Void*)
      • ConstructSystem(Type)
      • ConstructSystem<T>()
      • ConstructSystem<T>(Type)
      • Equals(Object, Object, Int32)
      • Equals(Object, Void*, Int32)
      • Equals(Void*, Void*, Int32)
      • Equals<T>(ref T, ref T)
      • GetAllTypes()
      • GetEntityOffsets(Int32)
      • GetFastEqualityTypeInfo(TypeManager.TypeInfo)
      • GetHashCode(Object, Int32)
      • GetHashCode(Void*, Int32)
      • GetHashCode<T>(ref T)
      • GetSystemAttributes(Type, Type)
      • GetSystemName(Type)
      • GetSystems()
      • GetSystemTypeIndex(Type)
      • GetType(Int32)
      • GetTypeCount()
      • GetTypeIndex(Type)
      • GetTypeIndex<T>()
      • GetTypeIndexFromStableTypeHash(UInt64)
      • GetTypeInfo(Int32)
      • GetTypeInfo<T>()
      • GetWriteGroupTypes(Int32)
      • HasEntityReferences(Int32)
      • Initialize()
      • IsAssemblyReferencingEntities(Assembly)
      • IsAssemblyReferencingUnityEngine(Assembly)
      • IsBuffer(Int32)
      • IsChunkComponent(Int32)
      • IsManagedComponent(Int32)
      • IsSharedComponent(Int32)
      • IsSystemAGroup(Type)
      • IsSystemStateComponent(Int32)
      • IsSystemStateSharedComponent(Int32)
      • IsZeroSized(Int32)
      • MakeChunkComponentTypeIndex(Int32)
      • RegisterUnityEngineObjectType(Type)
      • Shutdown()
      • ThrowOnDisallowedComponentData(Type, Type, String)
      • ThrowOnDisallowedManagedComponentData(Type, Type, String)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023