Struct RawHash
Stores hash information as an array of bytes.
Namespace: UnityEditor.Build.Pipeline.Utilities
Syntax
public struct RawHash : IEquatable<RawHash>
Methods
Equals(Object)
Determines if the current hash instance is equivalent to the specified hash.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The hash to compare to. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the hashes are equivalent. Returns false otherwise. |
Equals(RawHash)
Determines if the current hash instance is equivalent to the specified hash.
Declaration
public bool Equals(RawHash other)
Parameters
Type | Name | Description |
---|---|---|
RawHash | other | The hash to compare to. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the hashes are equivalent. Returns false otherwise. |
GetHashCode()
Creates the hash code for the cache entry.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | Returns the hash code for the cache entry. |
ToBytes()
Converts the hash to bytes.
Declaration
public byte[] ToBytes()
Returns
Type | Description |
---|---|
Byte[] | Returns the converted hash as an array of bytes. |
ToGUID()
Converts the hash to a guid.
Declaration
public GUID ToGUID()
Returns
Type | Description |
---|---|
GUID | Returns the converted hash as a guid. |
ToHash128()
Converts the hash to
Declaration
public Hash128 ToHash128()
Returns
Type | Description |
---|---|
Hash128 | Returns the converted hash. |
ToString()
Converts the hash to a formatted string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | Returns the hash as a string. |
Operators
Equality(RawHash, RawHash)
Determines if the left hash instance is equivalent to the right hash.
Declaration
public static bool operator ==(RawHash left, RawHash right)
Parameters
Type | Name | Description |
---|---|---|
RawHash | left | The hash to compare against. |
RawHash | right | The hash to compare to. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the hashes are equivalent. Returns false otherwise. |
Inequality(RawHash, RawHash)
Determines if the left hash instance is not equivalent to the right hash.
Declaration
public static bool operator !=(RawHash left, RawHash right)
Parameters
Type | Name | Description |
---|---|---|
RawHash | left | The hash to compare against. |
RawHash | right | The hash to compare to. |
Returns
Type | Description |
---|---|
Boolean | Returns true if the hashes are not equivalent. Returns false otherwise. |