Struct ComponentTypes | Entities | 0.16.0-preview.21
docs.unity3d.com
    Show / Hide Table of Contents

    Struct ComponentTypes

    An immutable list of ComponentType values.

    Namespace: Unity.Entities
    Syntax
    public struct ComponentTypes
    Remarks

    Max numbers of types is 15 (the capacity of FixedListInt64).

    Values in the list are sorted by their internal type index.

    Only the types themselves are stored, not any access modes.

    Cannot contain multiple ComponentType values with the same type index (safety checks in the constructors will throw an exception).

    Constructors

    ComponentTypes(ComponentType)

    Declaration
    public ComponentTypes(ComponentType a)
    Parameters
    Type Name Description
    ComponentType a

    ComponentTypes(ComponentType, ComponentType)

    Declaration
    public ComponentTypes(ComponentType a, ComponentType b)
    Parameters
    Type Name Description
    ComponentType a
    ComponentType b

    ComponentTypes(ComponentType, ComponentType, ComponentType)

    Declaration
    public ComponentTypes(ComponentType a, ComponentType b, ComponentType c)
    Parameters
    Type Name Description
    ComponentType a
    ComponentType b
    ComponentType c

    ComponentTypes(ComponentType, ComponentType, ComponentType, ComponentType)

    Declaration
    public ComponentTypes(ComponentType a, ComponentType b, ComponentType c, ComponentType d)
    Parameters
    Type Name Description
    ComponentType a
    ComponentType b
    ComponentType c
    ComponentType d

    ComponentTypes(ComponentType, ComponentType, ComponentType, ComponentType, ComponentType)

    Declaration
    public ComponentTypes(ComponentType a, ComponentType b, ComponentType c, ComponentType d, ComponentType e)
    Parameters
    Type Name Description
    ComponentType a
    ComponentType b
    ComponentType c
    ComponentType d
    ComponentType e

    ComponentTypes(ComponentType[])

    Declaration
    public ComponentTypes(ComponentType[] componentType)
    Parameters
    Type Name Description
    ComponentType[] componentType

    Fields

    m_masks

    Declaration
    public ComponentTypes.Masks m_masks
    Field Value
    Type Description
    ComponentTypes.Masks

    Properties

    Length

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    Int32

    Methods

    GetComponentType(Int32)

    Returns a ComponentType for the type stored at the index in the list.

    The returned ComponentType always has access mode ReadWrite.

    Declaration
    public ComponentType GetComponentType(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    ComponentType

    GetTypeIndex(Int32)

    Declaration
    public int GetTypeIndex(int index)
    Parameters
    Type Name Description
    Int32 index
    Returns
    Type Description
    Int32
    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