# GetHashCode()

> Returns a hash code for the current StateReference.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor.GraphVisualization](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization.md)
* **Assembly:** UnityEditor

```csharp
public override int GetHashCode()
```

### Returns

| Type                                                       | Description                                                                                                                                                                                                                                                                                                                  |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | A hash code derived from the [StateReference.StateID](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/statereference/stateid.md) and [StateReference.Context](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/statereference/context.md) of the current reference. |
