---
title: StringHash(string)
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/ctor
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/stringhash/ctor.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:51:46.739Z
locale: en-us
---

# StringHash(string)

> Creates a hash for a string.

## Definition

* **Type:** Constructor
* **Namespace:** [Unity.Animations](/engine/7000.0/script-reference/unity/animations.md)
* **Assembly:** [UnityEngine.AnimationCoreModule](/engine/7000.0/script-reference/modules/unityengine-animationcoremodule.md)

```csharp
[ExcludeFromBurstCompatTesting("Takes managed string")]
public StringHash(string str)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The string to hash, such as a transform path or a property name.

### Remarks

The hash is the CRC32 of the string, the same as the identifiers that rigs and clips use for transform paths and property names. A null or empty string gives a hash of 0, which [StringHash.IsNullOrEmpty](/engine/7000.0/script-reference/unity/animations/stringhash/isnullorempty.md) reports as null or empty.
