docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetSharedComponent

    GetSharedComponent<T>(Entity)

    Gets a shared component from an entity.

    Declaration
    public T GetSharedComponent<T>(Entity entity) where T : unmanaged, 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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)