docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetFieldSize

    GetFieldSize(Type, string)

    Gets the runtime field size in bytes.

    Declaration
    public static int GetFieldSize(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 number of 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)