Documentation

Unity Engine


Unity Engine


CalculateStableTypeHash

Calculates a stable type hash for the input type.
Read time 1 minuteLast updated a day ago

Definition

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

CalculateStableTypeHash(Type, IEnumerable<CustomAttributeData>, Dictionary<Type, ulong>)

Calculates a stable type hash for the input type.
public static ulong CalculateStableTypeHash(Type type, IEnumerable<CustomAttributeData> customAttributes = null, Dictionary<Type, ulong> hashCache = null)

Parameters

type

Type to hash.

Custom attributes for the provided type (if any).

Cache for Types and their hashes. Used for quicker lookups when hashing.

Returns

Type

Description

ulongStableTypeHash for the input type.

Remarks

This hash is NOT expected to remain the same across versions.

CalculateStableTypeHash(Type, Dictionary<Type, ulong>)

Calculates a stable type hash for the input type.
public static ulong CalculateStableTypeHash(Type type, Dictionary<Type, ulong> hashCache)

Parameters

type

Type to hash.

Cache for Types and their hashes. Used for quicker lookups when hashing.

Returns

Type

Description

ulongStableTypeHash for the input type.

Remarks

This hash is NOT expected to remain the same across versions.