Method GetHashCode
GetHashCode<T>(ref T)
Generates a hash for a given component instance
Declaration
[GenerateTestsForBurstCompatibility(GenericTypeArguments = new Type[]{typeof(Entity)})]
public static int GetHashCode<T>(ref T val)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| T | val | Component instance to hash |
Returns
| Type | Description |
|---|---|
| Int32 | Returns true if the types are equal. |
Type Parameters
| Name | Description |
|---|---|
| T | Component type |
GetHashCode(Void*, TypeIndex)
Generates a hash for a given component instance
Declaration
[GenerateTestsForBurstCompatibility]
public static int GetHashCode(void *val, TypeIndex typeIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Void* | val | Pointer to component instance to hash |
| TypeIndex | typeIndex | TypeIndex for the component |
Returns
| Type | Description |
|---|---|
| Int32 | Returns true if the types are equal. |
GetHashCode(Object, TypeIndex)
Generates a hash for a given component instance
Declaration
public static int GetHashCode(object val, TypeIndex typeIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| Object | val | Component instance to hash |
| TypeIndex | typeIndex | TypeIndex for the component |
Returns
| Type | Description |
|---|---|
| Int32 | Returns true if the types are equal. |