docs.unity.cn
    Show / Hide Table of Contents

    Method GetFieldOffset

    GetFieldOffset(Type, String)

    Gets the runtime field offset in bytes

    Declaration
    public static int GetFieldOffset(Type type, string fieldName)
    Parameters
    Type Name Description
    Type type

    Type of the runtime component. Must implement IComponentData.

    String fieldName

    Runtime field.

    Returns
    Type Description
    Int32

    Returns the offset in bytes of the runtime field.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the runtime field was not registered.

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