docs.unity.cn
    Show / Hide Table of Contents

    Method CalculateFieldOffsetsUnmanaged

    CalculateFieldOffsetsUnmanaged(Type, out Boolean, out Boolean, out Boolean, ref NativeList<TypeManager.EntityOffsetInfo>, ref NativeList<TypeManager.EntityOffsetInfo>, ref NativeList<TypeManager.EntityOffsetInfo>, HashSet<Type>)

    Calculates the field offsets.

    Declaration
    public static void CalculateFieldOffsetsUnmanaged(Type type, out bool hasEntityRefs, out bool hasBlobRefs, out bool hasWeakAssetRefs, ref NativeList<TypeManager.EntityOffsetInfo> entityOffsets, ref NativeList<TypeManager.EntityOffsetInfo> blobOffsets, ref NativeList<TypeManager.EntityOffsetInfo> weakAssetRefOffsets, HashSet<Type> cache = null)
    Parameters
    Type Name Description
    Type type

    The inspected type.

    Boolean hasEntityRefs

    True if the type has any fields of type Entity, otherwise false.

    Boolean hasBlobRefs

    True if the type has any fields of type Unity.Entities.BlobAssetReferenceData, otherwise false.

    Boolean hasWeakAssetRefs

    True if the type has fields of type UntypedWeakReferenceId, otherwise false.

    NativeList<TypeManager.EntityOffsetInfo> entityOffsets

    The offsets of the fields of type Entity.

    NativeList<TypeManager.EntityOffsetInfo> blobOffsets

    The offsets of the fields of type Unity.Entities.BlobAssetReferenceData.

    NativeList<TypeManager.EntityOffsetInfo> weakAssetRefOffsets

    The offsets of the fields of type UntypedWeakReferenceId.

    HashSet<Type> cache

    Cache to accelerate type inspection codepaths when calling this function multiple times.

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