docs.unity.cn
    Show / Hide Table of Contents

    Method GetSharedComponentData

    GetSharedComponentData<T>(Entity)

    Obsolete. Use GetSharedComponentManaged<T>(Entity) instead.

    Declaration
    [Obsolete("Use GetSharedComponentManaged<T> (UnityUpgradable) -> GetSharedComponentManaged<T>(*)", true)]
    public T GetSharedComponentData<T>(Entity entity)
        where T : struct, ISharedComponentData
    Parameters
    Type Name Description
    Entity entity

    The entity.

    Returns
    Type Description
    T

    A copy of the shared component.

    Type Parameters
    Name Description
    T

    The type of shared component.

    GetSharedComponentData<T>(Int32)

    Obsolete. Use GetSharedComponentManaged<T>(Int32) instead.

    Declaration
    [Obsolete("Use GetSharedComponentManaged<T> (UnityUpgradable) -> GetSharedComponentManaged<T>(*)", true)]
    public T GetSharedComponentData<T>(int sharedComponentIndex)
        where T : struct, ISharedComponentData
    Parameters
    Type Name Description
    Int32 sharedComponentIndex

    The index of the shared component in the internal shared component list.

    Returns
    Type Description
    T

    A copy of the shared component.

    Type Parameters
    Name Description
    T

    The data type of the shared component.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023