docs.unity.cn
    Show / Hide Table of Contents

    Method GetComponentDataRW

    GetComponentDataRW<T>(SystemHandle)

    Gets the value of a component for an entity associated with a system.

    Declaration
    [GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(BurstCompatibleComponentData)})]
    public RefRW<T> GetComponentDataRW<T>(SystemHandle system)
        where T : struct, IComponentData
    Parameters
    Type Name Description
    SystemHandle system

    The system handle.

    Returns
    Type Description
    RefRW<T>

    A RefRW<T> struct of type T containing access to the component value.

    Type Parameters
    Name Description
    T

    The type of component to retrieve.

    Exceptions
    Type Condition
    ArgumentException

    Thrown if the component type has no fields.

    InvalidOperationException

    Thrown if the system isn't from thie world.

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