Class ComponentSystemBaseManagedComponentExtensions | Entities | 0.13.0-preview.24
docs.unity3d.com
    Show / Hide Table of Contents

    Class ComponentSystemBaseManagedComponentExtensions

    Inheritance
    Object
    ComponentSystemBaseManagedComponentExtensions
    Namespace: Unity.Entities
    Syntax
    public static class ComponentSystemBaseManagedComponentExtensions

    Methods

    GetSingleton<T>(ComponentSystemBase)

    Gets the value of a singleton component.

    Declaration
    public static T GetSingleton<T>(this ComponentSystemBase sys)
        where T : class, IComponentData
    Parameters
    Type Name Description
    ComponentSystemBase sys
    Returns
    Type Description
    T

    The component.

    Type Parameters
    Name Description
    T

    The IComponentData subtype of the singleton component.

    See Also
    GetSingleton<T>()

    HasSingleton<T>(ComponentSystemBase)

    Checks whether a singleton component of the specified type exists.

    Declaration
    public static bool HasSingleton<T>(this ComponentSystemBase sys)
        where T : class, IComponentData
    Parameters
    Type Name Description
    ComponentSystemBase sys
    Returns
    Type Description
    Boolean

    True, if a singleton of the specified type exists in the current World.

    Type Parameters
    Name Description
    T

    The IComponentData subtype of the singleton component.

    SetSingleton<T>(ComponentSystemBase, T)

    Sets the value of a singleton component.

    Declaration
    public static void SetSingleton<T>(this ComponentSystemBase sys, T value)
        where T : class, IComponentData
    Parameters
    Type Name Description
    ComponentSystemBase sys
    T value

    A component containing the value to assign to the singleton.

    Type Parameters
    Name Description
    T

    The IComponentData subtype of the singleton component.

    See Also
    SetSingleton<T>(T)
    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