docs.unity3d.com
    Show / Hide Table of Contents

    Method GetPrimaryEntity

    GetPrimaryEntity(UnityEngine.Object)

    Returns the primary entity associated with the given object. This entity is from the destination world.

    Declaration
    public Entity GetPrimaryEntity(UnityEngine.Object uobject)
    Parameters
    Type Name Description
    UnityEngine.Object uobject

    The object to get the primary entity for.

    Returns
    Type Description
    Entity

    The primary entity associated with the given entity. This is the null entity if there is no primary entity for the object.

    GetPrimaryEntity(UnityEngine.Component)

    Returns the primary entity associated with the given GameObject of the given component. This entity is from the destination world.

    Declaration
    public Entity GetPrimaryEntity(UnityEngine.Component component)
    Parameters
    Type Name Description
    UnityEngine.Component component

    The component for whose GameObject to get the primary entity for.

    Returns
    Type Description
    Entity

    The primary entity associated with the given entity. This is the null entity if there is no primary entity for the object.

    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