---
title: StringHash
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/stringhash
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/stringhash.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:41:50.013Z
locale: en-us
---

# StringHash

> A 32-bit hash of a string that identifies bones, channels, and clip bindings in a rig.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)
* **Implements:** [IEquatable\<StringHash>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct StringHash : IEquatable<StringHash>
```

## Remarks

The hash of a string is the CRC32 of the string. [RigBuilder](/engine/7000.0/script-reference/unity/animations/rigbuilder.md) 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 |
| ----------------------------------------------------------------------- | ----------- |
| [Id](/engine/7000.0/script-reference/unity/animations/stringhash/id.md) | Hash value. |

## Constructors

| Constructor                                                                                      | Description                  |
| ------------------------------------------------------------------------------------------------ | ---------------------------- |
| [StringHash(System.String)](/engine/7000.0/script-reference/unity/animations/stringhash/ctor.md) | Creates a hash for a string. |

## Methods

| Method                                                                                    | Description                                                                                                                                                                                                          |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Equals](/engine/7000.0/script-reference/unity/animations/stringhash/equals.md)           | Determines whether an object is a [StringHash](/engine/7000.0/script-reference/unity/animations/stringhash.md) that equals the current [StringHash](/engine/7000.0/script-reference/unity/animations/stringhash.md). |
| [GetHashCode](/engine/7000.0/script-reference/unity/animations/stringhash/gethashcode.md) | Calculates hash code for the [StringHash](/engine/7000.0/script-reference/unity/animations/stringhash.md).                                                                                                           |

## Static Methods

| Method                                                                                        | Description                                                                                                      |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [CombineHash](/engine/7000.0/script-reference/unity/animations/stringhash/combinehash.md)     | Combines two string hashes into one hash.                                                                        |
| [IsNullOrEmpty](/engine/7000.0/script-reference/unity/animations/stringhash/isnullorempty.md) | Tests whether the [StringHash](/engine/7000.0/script-reference/unity/animations/stringhash.md) is null or empty. |

## Operators

| Operator                                                                                    | Description                                                                                    |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [operator ==](/engine/7000.0/script-reference/unity/animations/stringhash/op-equality.md)   | Returns `true` if two hashes are equal.                                                        |
| [StringHash](/engine/7000.0/script-reference/unity/animations/stringhash/op-implicit.md)    | Converts a string into its hash, so that you can pass a string where a StringHash is expected. |
| [operator !=](/engine/7000.0/script-reference/unity/animations/stringhash/op-inequality.md) | Returns `true` if two hashes are unequal.                                                      |
