[3.8.2] VRCSDK Builder page will revert transform changes to rest pose
available in future release
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:
SDK 3.8.2 affecting emissions of Poiyomi
Azukí
For some reason when focusing on the SDK window, it will animate/override a material on my avatar, specifically the emission 0 strength. Doesn't happen on SDK 3.8.1 or lower!
Dexvoid
Merged in a post:
SDK sometimes reverts object toggles in editor
A p o c
SDK versions tested: 3.8.2-beta.1, 3.8.2, 3.9.0_beta.1
Unity version: 2022.3.22f1
Discovered while working on an avatar. If an object in the avatar hierarchy is disabled, and I click to enable it, a moment later it will disable itself again. If it is enabled, and I click to disable it, it will enable itself within a few seconds. If I duplicate the object and toggle it, it will not be affected. If I duplicate the object, delete the original, and rename the duplicated object to the name of the original object, the bug returns. There is no output in the console to indicate anything is happening. Avatars running in gesture manager emulator behave as expected, as do animations played in the editor.
At first I thought another script or package may be the culprit (I initially thought it might be VRCFury). I removed all scripts and packages except the VRC SDK from the project and the issue remained. I narrowed it down to the VRC SDK once I downgraded to 3.8.1 and the issue was resolved. Updating to any newer version reintroduced the bug, and downgrading back to 3.8.1 consistently resolves the issue. Sometimes, removing and reinstalling other packages appears to fix the problem, but it always returns. Only downgrading the VRC SDK to 3.8.1 resolves the problem in a way that persists through a restart of Unity.
chemicalcrux
This happens because the Builder window calls Rebind() on your animator. This causes the animator to write its default values, which will reset every animated property to the value it had when the animator first woke up.
Reloading the scene will cause the animator to wake up again, which will change the default values the animator writes.
This was added to make sure that the animator's avatarRoot property is valid, since it could have been changed (e.g. by the "auto-fix" option that parents the avatar root directly to the animator's GameObject).
There is no way to rebind the animator without writing default values.
This is a very weird edge-case to be watching out for, and it winds up causing problems for most users.
Dexvoid
chemicalcrux The pending fix uses reflection to invoke the private overload of this method that does not write defaults.
chemicalcrux
Dexvoid Makes sense! I should have qualified that "no way" statement with "no way without reflection" 😉
RuneFox237
This may be anecdotal evidence but I believe removing the animation controller from your avatar's Animator component before switching to the SDK window fixes the issue, at least temporarily.
Bamber
This needs to be fixed before vrchat blocks the unaffected SDK versions from uploading new avatars.
Buddy_DE
Happens since 3.8.2, 3.8.1 did not have this behavior.
Still present in 3.9.0.
Dexvoid
Merged in a post:
Updating the VRCSDK Base and Avatar versions to 3.8.2 or higher will restore bones edited in Play Mode.
伊ノ本カズラ
As the title states, when updating VRCSDK Base and Avatar to version 3.8.2 or later, bones edited in Play Mode revert to their default positions after a few seconds. Even after upgrading to version 3.9.0, this behavior persisted. Is this intended behavior?
Dexvoid
Merged in a post:
[3.8.2/3.9.0] Changes on avatar instantly reverts when VRChat SDK panel is open
Shiro K
Avatar SDK: I change something on my avatar in the inspector - e.g. assign another material. After 2 seconds, the change is automatically reverted. Means the previous material is assigned again.
This only happens when the VRChat SDK panel is active. My avatar is a prefab, but this happen also when it's unpacked.
Azukí
Seems that it happens when an animator is attached to the avatar that animate's those properties, it's strange it happens because of the SDK.
This post was marked as
available in future release
Load More
→