文档

Unity Engine

Download Unity

Unity Engine

CalculateStableTypeHash

Calculates a stable type hash for the input type.
阅读时间1 分钟最后更新于 20 天前

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.