docs.unity3d.com
    Show / Hide Table of Contents

    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
    ValueType.Equals(Object)

    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
    ValueType.GetHashCode()

    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
    ValueType.ToString()

    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023