Struct RawHash
Stores hash information as an array of bytes.
Namespace: UnityEditor.Build.Pipeline.Utilities
Syntax
[Serializable]
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. |
Overrides
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. |
Overrides
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 |
---|---|
UnityEditor.GUID | Returns the converted hash as a guid. |
ToHash128()
Converts the hash to Hash128 format.
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. |
Overrides
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. |