docs.unity3d.com
Search Results for

    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
    int

    Returns the offset in bytes of the runtime field.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if the runtime field was not registered.

    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)