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 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 |
|---|---|
| ulong | StableTypeHash 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 to hash.
Cache for Types and their hashes. Used for quicker lookups when hashing.
Returns
Type | Description |
|---|---|
| ulong | StableTypeHash for the input type. |
Remarks
This hash is NOT expected to remain the same across versions.