docs.unity3d.com
    Show / Hide Table of Contents

    Method GetComponentDataPtrRW

    GetComponentDataPtrRW<T>(ref ComponentTypeHandle<T>)

    Provides an unsafe read/write interface to components stored in this chunk.

    Declaration
    public void *GetComponentDataPtrRW<T>(ref ComponentTypeHandle<T> chunkComponentTypeHandle)
    Parameters
    Type Name Description
    ComponentTypeHandle<T> chunkComponentTypeHandle

    An object containing type and job safety information. Create this object by calling GetComponentTypeHandle<T>(Boolean)immediately before scheduling a job. Pass the object to a job using a public field you define as part of the job struct.

    Returns
    Type Description
    Void*

    A pointer to the component data stored in the chunk.

    Type Parameters
    Name Description
    T

    The data type of the component.

    Exceptions
    Type Condition
    ArgumentException

    If you call this function on a "tag" component type (which is an empty component with no fields).

    InvalidOperationException

    If the provided type handle is read-only.

    Back to top
    Terms of use
    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