docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TypeManager.TypeInfo

    Provides information about component types such as their runtime size, how much space they use in Chunk storage, their TypeIndex, how many entity references they contain, and more.

    Namespace: Unity.Entities
    Assembly: solution.dll
    Syntax
    [GenerateTestsForBurstCompatibility]
    public readonly struct TypeManager.TypeInfo

    Constructors

    Name Description
    TypeInfo(int, TypeCategory, int, int, ulong, ulong, int, int, int, int, int, int, int, bool, int, int, int, int, int)

    Used internally to construct a TypeInfo.

    Fields

    Name Description
    AlignmentInBytes

    The alignment requirement for the component. For buffer types, this is the alignment requirement of the element type.

    BlobAssetRefOffsetCount

    Number of BlobAssetReference<T>s this component can store.

    BufferCapacity

    The maximum number of elements that can be stored in a buffer component instance.

    Category

    TypeManager.TypeCategory

    ElementSize

    The size of an element store in buffer components. For non-buffer component types, this is the same as SizeInChunk

    EntityOffsetCount

    Number of Entity references this component can store.

    MaximumChunkCapacity

    Maximum number of instances of this component allowed to be stored in a Chunk.

    MemoryOrdering

    Sort order for component types in Chunk storage. By default this is equivalent to StableTypeHash. Order is sorted from lowest to highest.

    SizeInChunk

    The number of bytes used in a Chunk to store an instance of this component.

    StableTypeHash

    Hash used to uniquely identify a component based on its runtime memory footprint.

    TypeIndex

    TypeIndex

    TypeSize

    Blittable size of the component type.

    WeakAssetRefOffsetCount

    Number of WeakReference<T>s this component can store.

    WriteGroupCount

    Number of components which specify this component as the target type in a WriteGroupAttribute.

    Properties

    Name Description
    AlignmentInChunkInBytes

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

    BakingOnlyType

    IsBakingOnlyType

    DebugTypeName

    Provides a HPC# / Burst compatible name of the component type when building with DEBUG defined. Otherwise the name is empty.

    EnableableType

    IsEnableable

    HasBlobAssetRefs

    For struct IComponentData, a value of true gurantees 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)

    HasWeakAssetRefs

    For struct IComponentData, a value of true gurantees that there are WeakReference<T> 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<T> members can not be proven statically)

    HasWriteGroups

    Returns true if a component with a WriteGroupAttribute specifies this component as it's targetType

    IsZeroSized

    Returns true if the component does not require space in Chunk memory

    TemporaryBakingType

    IsTemporaryBakingType

    Type

    Returns the System.Type for the component this TypeManager.TypeInfo is describing.


    Did you find this page useful? Please give it a rating:

    Thanks for rating this page!

    Report a problem on this page

    What kind of problem would you like to report?

    • This page needs code samples
    • Code samples do not work
    • Information is missing
    • Information is incorrect
    • Information is unclear or confusing
    • There is a spelling/grammar error on this page
    • Something else

    Thanks for letting us know! This page has been marked for review based on your feedback.

    If you have time, you can provide more information to help us fix the problem faster.

    Provide more information

    You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:

    You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:

    You've told us there is information missing from this page. Please tell us more about what's missing:

    You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:

    You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:

    You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:

    You've told us this page has a problem. Please tell us more about what's wrong:

    Thank you for helping to make the Unity documentation better!

    Your feedback has been submitted as a ticket for our documentation team to review.

    We are not able to reply to every ticket submitted.

    In This Article
    • Constructors
    • Fields
    • Properties
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)