docs.unity3d.com
    Show / Hide Table of Contents

    Method HasChunkComponent

    HasChunkComponent<T>(ComponentTypeHandle<T>)

    Reports whether this chunk contains a chunk component of the specified component type.

    Declaration
    public bool HasChunkComponent<T>(ComponentTypeHandle<T> chunkComponentTypeHandle)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    ComponentTypeHandle<T> chunkComponentTypeHandle

    An object containing type and job safety information. Create this object by calling GetComponentTypeHandle<T>(Boolean) immediately before scheduling a job. Pass the object to a job using a public field you define as part of the job struct.

    Returns
    Type Description
    Boolean

    True, if this chunk contains a chunk component of the specified type.

    Type Parameters
    Name Description
    T

    The data type of the chunk component.

    Remarks

    When an EntityQuery includes optional components used as chunk components (with Any), some chunks returned by the query may have these chunk components and some may not. Use this function to determine whether or not the current chunk contains one of these optional component types as a chunk component.

    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