docs.unity.cn
    Show / Hide Table of Contents

    Method GetPrimaryEntity

    GetPrimaryEntity(Object)

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

    Declaration
    public Entity GetPrimaryEntity(Object uobject)
    Parameters
    Type Name Description
    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(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(Component component)
    Parameters
    Type Name Description
    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 © 2022 Unity Technologies
    Generated by DocFX
    on 04 August 2022
    Terms of use