Documentation

Unity Engine


Unity Engine


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.
Read time 1 minuteLast updated 2 days ago

Definition

  • Type: Method
  • Namespace: Unity.Entities
  • Assembly: UnityEngine.EntitiesModule

CalculateFieldOffsetsUnmanaged(Type, bool, bool, bool, bool, NativeList<EntityOffsetInfo>, NativeList<EntityOffsetInfo>, NativeList<EntityOffsetInfo>, NativeList<EntityOffsetInfo>, HashSet<Type>)

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

The inspected type.

hasEntityRefs

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

hasBlobRefs

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

hasWeakAssetRefs

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

hasUnityObjectRefs

True if the type has fields of type UnityObjectRef<T>, otherwise false.

The offsets of the fields of type Entity.

The offsets of the fields of type BlobAssetReferenceData.

weakAssetRefOffsets

The offsets of the fields of type UntypedWeakReferenceId.

unityObjectRefOffsets

The offsets of the fields of type UnityObjectRef<T>.

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