---
title: TrySetDefaultInt(StringHash, int)
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/rigbuilder/trysetdefaultint
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetdefaultint.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:52:28.862Z
locale: en-us
---

# TrySetDefaultInt(StringHash, int)

> Sets the default value of the integer channel that has an identifier.

## Definition

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

```csharp
public bool TrySetDefaultInt(StringHash id, int value)
```

### Parameters

**** (\[StringHash]\(/engine/7000.0/script-reference/unity/animations/stringhash)): The identifier of the channel.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The default value of the channel.

### Returns

| Type                                                          | Description                                                                                                      |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the builder has a integer channel with the identifier. Otherwise, false, and the builder doesn't change. |
