Documentation

Unity Engine


Unity Engine


TypeManager.TypeInfo

Provides information about component types such as their runtime size, how much space they use in Chunk storage, their TypeManager.TypeInfo.TypeIndex, how many entity references they contain, and more.
Read time 3 minutesLast updated 3 days ago

Definition

  • Type: Struct
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule
public readonly struct TypeManager.TypeInfo

Fields

Value

Description

AlignmentInBytesThe alignment requirement for the component. For buffer types, this is the alignment requirement of the element type.
BlobAssetRefOffsetCountNumber of BlobAssetReference<T>s this component can store.
BloomFilterMaskBitmask used to accelerate "is type set A a subset of type set B?" queries.
BufferCapacityThe maximum number of elements that can be stored in a buffer component instance.
CategoryTypeManager.TypeCategory
ElementSizeThe size of an element store in buffer components. For non-buffer component types, this is the same as TypeManager.TypeInfo.SizeInChunk
EntityOffsetCountNumber of Entity references this component can store.
MaximumChunkCapacityMaximum number of instances of this component allowed to be stored in a Chunk.
MemoryOrderingSort order for component types in Chunk storage. By default this is equivalent to TypeManager.TypeInfo.StableTypeHash. Order is sorted from lowest to highest.
SizeInChunkThe number of bytes used in a Chunk to store an instance of this component.
StableTypeHashHash used to uniquely identify a component based on its runtime memory footprint.
TypeIndexTypeManager.TypeInfo.TypeIndex
TypeSizeBlittable size of the component type.
WeakAssetRefOffsetCountNumber of WeakReference_1s this component can store.

Constructors

Properties

Property

Description

AlignmentInChunkInBytesAlignment of this type in a chunk. Normally the same as AlignmentInBytes, but that might be less than this value for buffer elements, whereas the buffer itself must be aligned to TypeManager.MaximumSupportedAlignment.
BakingOnlyTypeTypeIndex.IsBakingOnlyType
DebugTypeNameProvides a HPC# / Burst compatible name of the component type when building with DEBUG defined. Otherwise the name is empty.
EnableableTypeTypeIndex.IsEnableable
HasBlobAssetRefsFor struct IComponentData, a value of true guarantees that there are BlobAssetReference<T> fields in this component. For class based IComponentData, a value of true means it is possible, but not guaranteed, that there are blob asset references. (Polymorphic BlobAssetReference<T> members can not be proven statically)
HasUnityObjectRefsReturns whether there are any UnityObjectRefs fields in this component.
HasWeakAssetRefsFor struct IComponentData, a value of true guarantees that there are WeakReference_1 fields in this component. For class based IComponentData, a value of true means it is possible, but not guaranteed, that there are WeakReferences. (Polymorphic WeakReference_1 members can not be proven statically)
IsZeroSizedReturns true if the component does not require space in Chunk memory
TemporaryBakingTypeTypeIndex.IsTemporaryBakingType
TypeReturns the System.Type for the component this TypeManager.TypeInfo is describing.