[3.8.2] VRCSDK Builder page will revert transform changes to rest pose
tracked
anatawa12
Problem
Opening VRCSDK Builder page or changing the selected avatar will revert pose (transform) to rest pose defined in the 'Avatar' asset of the root Animator component.
Cause of the problem
In the
OnGUIAvatarCheck
method of the VRCSdkControlPanelAvatarBuilder
class, it will call Animator.Rebind
method to check the situations you call "nested armature".However, Animator.Rebind function will write the default pose defined in the 'Avatar' asset so it will revert any pose changes made in the editor.
This is annoying since this will disturb creating animation clips and testing them in the editor.
Solution
One solution is to use
Animator.Rebind(bool writeDefaultPose)
private method and pass false
to writeDefaultPose
parameter, instead of passing true
to it, which is the default value.This method is not available as public API but it will keep available until Unity 6000.2.0b4 (the latest available C# reference version.
Another solution is to collect the current pose before calling
Animator.Rebind
and restore it after the call but this takes more code.Log In
Dexvoid
Merged in a post:
SerializeReference values in the avatar revert when the SDK Builder panel is opened
nekobako
Reproduction steps:
- Attach a component that contains a SerializeReference to an avatar.
- Assign an AnimatorController to the avatar’s Animator.
- In the AnimatorController, create an Animation that animates a value in the SerializeReference.
- Open the SDK Builder panel.
- In the Inspector, change the value in the SerializeReference.
- After about 2 seconds, the value reverts to its previous state.
The component that contains a SerializeReference is something like this.
using System;
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
[Serializable]
private class Test
{
public float TestValue;
}
[SerializeReference]
private Test TestReference = new();
}
Expected behavior:
Even when the SDK Builder panel is open, the values set in the Inspector should not revert.
Dexvoid
Merged in a post:
Avatar property changes revert while the SDK Builder panel is open
nekobako
If an AnimatorController is assigned to the avatar’s Animator, any properties animated by that controller will revert to their previous state when modified in the Inspector while the SDK Builder panel is open.
This issue occurs with both VRChat-provided components and custom components used in non-destructive workflows.
Reproduction steps:
- Assign an AnimatorController to the avatar’s Animator.
- In the AnimatorController, create an Animation that animates a property of any component.
- Open the SDK Builder panel.
- In the Inspector, change the property that is being animated.
- After about 2 seconds, the value reverts to its previous state.
Expected behavior:
Even when the SDK Builder panel is open, the properties set in the Inspector should not revert.
A reproduction video using the VRC Position Constraint component is attached.
ahzkwid
I’ve experienced this issue as well.
In my case, the pose keeps reverting even after I change it. Because of this, I have to exit the Builder, work on the pose, save the scene, and then reload it every time. It’s quite troublesome.
Since the cause is still unknown, I’ve just been leaving it as is.
私もこの問題を経験しました。
私の場合は、ポーズを変更しても元に戻ってしまう現象です。
そのため、ポーズ作業を行うときは毎回Builderを閉じてから作業し、シーンを保存して再読み込みしています。かなり面倒です。
原因が不明なので、そのまま放置していました。
nekobako
Tested on SDK 3.9.0
This post was marked as
tracked