Method CalculateHash
CalculateHash(Object)
Calculates the hash of an UnityEngine.Object.
Declaration
public static Hash128 CalculateHash(Object o)Parameters
| Type | Name | Description |
|---|---|---|
| Object | o | The object to calculate the hash of. |
Returns
| Type | Description |
|---|---|
| Hash128 | The calculated hash. |
Remarks
UnityEngine.Object.GetInstanceID() is used to calculate the hash.
CalculateHash<T>(T)
Calculates the hash of a struct.
Declaration
public static Hash128 CalculateHash<T>(T s)
where T : structParameters
| Type | Name | Description |
|---|---|---|
| T | s | The |
Returns
| Type | Description |
|---|---|
| Hash128 | The calculated hash. |
Type Parameters
| Name | Description |
|---|---|
| T | the type of object to hash, must be of type |
CalculateHash(Boolean, Int32)
Calculates the hash of a bool.
Declaration
public static Hash128 CalculateHash(bool b, int shift)Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | b | The |
| Int32 | shift | How many bits to shift the bool by after converting it to a |
Returns
| Type | Description |
|---|---|
| Hash128 | The calculated hash. |
CalculateHash(Vector3)
Calculates the hash of a Vector3.
Declaration
public static Hash128 CalculateHash(Vector3 v)Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | v | The |
Returns
| Type | Description |
|---|---|
| Hash128 | The calculated hash. |
CalculateHash(Matrix4x4)
Calculates the hash of a Matrix4x4.
Declaration
public static Hash128 CalculateHash(Matrix4x4 m)Parameters
| Type | Name | Description |
|---|---|---|
| Matrix4x4 | m | The |
Returns
| Type | Description |
|---|---|
| Hash128 | The calculated hash. |
CalculateHash(Bounds)
Calculates the hash of a Bounds.
Declaration
public static Hash128 CalculateHash(Bounds b)Parameters
| Type | Name | Description |
|---|---|---|
| Bounds | b | The |
Returns
| Type | Description |
|---|---|
| Hash128 | The calculated hash. |