docs.unity.cn
    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
    Int32

    Returns the number of 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