---
title: TrySetDefaultRotation(StringHash, quaternion)
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/trysetdefaultrotation
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetdefaultrotation.md
last_updated: 2026-11-30
generated_at: 2026-11-30T20:50:37.715Z
locale: en-us
---

# TrySetDefaultRotation(StringHash, quaternion)

> Sets the default value of the rotation 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 TrySetDefaultRotation(StringHash id, quaternion rotation)
```

### Parameters

**** (\[StringHash]\(/engine/7000.0/script-reference/unity/animations/stringhash)): The identifier of the channel.**** (\[quaternion]\(/engine/7000.0/script-reference/unity/mathematics/quaternion)): The default rotation of the channel.

### Returns

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

### Remarks

The method only searches the channels that you add with [RigBuilder.Add](/engine/7000.0/script-reference/unity/animations/rigbuilder/add.md). To set the default rotation of a bone, use [RigBuilder.TrySetBoneDefaultRotation](/engine/7000.0/script-reference/unity/animations/rigbuilder/trysetbonedefaultrotation.md).
