docs.unity3d.com
    Show / Hide Table of Contents

    Method GetEntities

    GetEntities(UnityEngine.Object)

    Returns all entities in the destination world that are associated with the given object. This includes the primary entity associated with the object as well as all additional entities that were associated with this object. The first entity returned by the enumerator is the primary entity.

    Declaration
    public MultiListEnumerator<Entity> GetEntities(UnityEngine.Object uobject)
    Parameters
    Type Name Description
    UnityEngine.Object uobject

    The object to get the entities for.

    Returns
    Type Description
    MultiListEnumerator<Entity>

    An enumerator that returns the associated entities.

    GetEntities(UnityEngine.Component)

    Returns all entities in the destination world that are associated with the GameObject of the given component. This includes the primary entity associated with the object as well as all additional entities that were associated with this object. The first entity returned by the enumerator is the primary entity.

    Declaration
    public MultiListEnumerator<Entity> GetEntities(UnityEngine.Component component)
    Parameters
    Type Name Description
    UnityEngine.Component component

    The component whose GameObject to get the entities for.

    Returns
    Type Description
    MultiListEnumerator<Entity>

    An enumerator that returns the associated entities.

    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