Documentation

Unity Engine

Download Unity

Unity Engine

StringHash

A 32-bit hash of a string that identifies bones, channels, and clip bindings in a rig.
Read time 1 minuteLast updated 3 hours ago

Definition

public struct StringHash : IEquatable<StringHash>

Remarks

The hash of a string is the CRC32 of the string. RigBuilder and the channel types compute this hash for transform paths and property names. Clips store it in their bindings. For example,
new StringHash("Hips/Spine")
is the identifier of the bone with the path
Hips/Spine
in a rig built from transforms or an Avatar. The null string and the empty string both hash to 0.

Fields

Value

Description

IdHash value.

Constructors

Constructor

Description

StringHash(System.String)Creates a hash for a string.

Methods

Method

Description

EqualsDetermines whether an object is a StringHash that equals the current StringHash.
GetHashCodeCalculates hash code for the StringHash.

Static Methods

Method

Description

CombineHashCombines two string hashes into one hash.
IsNullOrEmptyTests whether the StringHash is null or empty.

Operators

Operator

Description

operator ==Returns
true
if two hashes are equal.
StringHashConverts a string into its hash, so that you can pass a string where a StringHash is expected.
operator !=Returns
true
if two hashes are unequal.