Method CalculateFieldOffsetsUnmanaged
CalculateFieldOffsetsUnmanaged(Type, out bool, out bool, out bool, out bool, ref NativeList<EntityOffsetInfo>, ref NativeList<EntityOffsetInfo>, ref NativeList<EntityOffsetInfo>, ref NativeList<EntityOffsetInfo>, HashSet<Type>)
Calculates the field offsets.
Declaration
public static void CalculateFieldOffsetsUnmanaged(Type type, out bool hasEntityRefs, out bool hasBlobRefs, out bool hasWeakAssetRefs, out bool hasUnityObjectRefs, ref NativeList<TypeManager.EntityOffsetInfo> entityOffsets, ref NativeList<TypeManager.EntityOffsetInfo> blobOffsets, ref NativeList<TypeManager.EntityOffsetInfo> weakAssetRefOffsets, ref NativeList<TypeManager.EntityOffsetInfo> unityObjectRefOffsets, HashSet<Type> cache = null)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The inspected type. |
bool | hasEntityRefs | True if the type has any fields of type Entity, otherwise false. |
bool | hasBlobRefs | True if the type has any fields of type BlobAssetReferenceData, otherwise false. |
bool | hasWeakAssetRefs | True if the type has fields of type UntypedWeakReferenceId, otherwise false. |
bool | hasUnityObjectRefs | True if the type has fields of type UnityObjectRef<T>, 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 BlobAssetReferenceData. |
NativeList<TypeManager.EntityOffsetInfo> | weakAssetRefOffsets | The offsets of the fields of type UntypedWeakReferenceId. |
NativeList<TypeManager.EntityOffsetInfo> | unityObjectRefOffsets | The offsets of the fields of type UnityObjectRef<T>. |
HashSet<Type> | cache | Cache to accelerate type inspection codepaths when calling this function multiple times. |