docs.unity.cn
    Show / Hide Table of Contents

    Method GetUnmanagedSharedComponentData

    GetUnmanagedSharedComponentData<T>(Entity)

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

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

    The target entity

    Returns
    Type Description
    T

    The index of the target entity's value for the shared component of type T.

    Type Parameters
    Name Description
    T

    The type of the unmanaged shared component to look up on the target entity

    GetUnmanagedSharedComponentData<T>(Int32)

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

    Declaration
    [Obsolete("Use GetSharedComponent<T> (UnityUpgradable) -> GetSharedComponent<T>(*)", true)]
    public T GetUnmanagedSharedComponentData<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