[VRCSDK3-AVATAR-2022.02.16.19.13] Viewing the avatar descriptor in the inspector causes the scene to be marked as dirty
tracked
lackofbindings
Just clicking on an avatar in the scene causes the scene to be marked as modified. In most cases this is just annoying as it prevents you from telling if the scene is saved or not. However it causes a big issue if you are like me and use prefabs to save variants; because the prefab attempts to auto save changes and thus will get stuck in an infinite flickery loop. I have found that collapsing the descriptor allows it behave normally. Perhaps caused by one of the gizmos or something? This didn't used to always happen, but has seemingly become increasingly common with each update.
Log In
Fax
tracked
Fax
Merged in a post:
VRCAvatarDescriptor marked dirty forever in 3.1.11
anatawa12
After we opened VRCAvatarDescriptor which is with Animator with humanoid avatar, all VRCAvatarDescriptor including with generic avatar marked dirty forever.
This issue makes prefab with VRCAvatarDescriptor at root GameObject thumbnail flickers.
This issue is very similar to another canny for older SDKs (https://feedback.vrchat.com/sdk-bug-reports/p/vrcsdk3-avatar-202202161913-viewing-the-avatar-descriptor-in-the-inspector-cause) however, much likely to happen so I made an separated canny to notice VRChat Team.
Many friends downgrades and suggests to downgrade VRCSDK to 3.1.10 because of this problem so I think this should be fixed as soon as possible.
Details of the bug
The static field _repaint of AvatarDescriptorEditor3 will be set to true if Animator is humanoid. However, _repaint will never get false. So, after we see the AvatarDescriptor with humanoid animator, the AvatarDescriptor will marked as dirty forever. I think VRChat forget resetting _repaint to false.
W i l k
This has neither been officialy acknowledged nor fixed yet. The underlying issue also causes a plethora of issues down the line related to Prefabs - including Unity Editor crashes on specific package imports and asset database corruption.
Rolling back to 3.1.10 solves this issue - broken projects might need a rebuild/reimport of the asset database by deleting the Library, Temp and other transient project directories
Tayou
I have encountered this issue for a long time, from like SDK version 3.0.4 or something onwards. I can also confirm, that the one-line fix from naqtn fixes it.
As a workaround for that issue I disabled prefab auto saving (top right of scene view while editing a prefab). It will still mark stuff as dirty as soon as you select the avatar, but at least it doesn't freak out entirely.
naqtn
Maybe I found the cause.
AvatarDescriptorEditor3
is missing _repaint = false
in the update loop. So, if once _repaint
becomes true, it continues to SetDirty
until quitting the editor. I think it should be false at the beginning of OnInspectorGUI
.Simple repro steps:
- Create a new Scene. Add a GameObject. Add VRCAvatarDescriptor.
- Save the Scene. Check if the dirty mark disappears.
- Show VRCAvatarDescriptor in the Inspector. Press the "Edit" button in the "View Position" property.
- Then the dirty mark shows up. It continues to be dirty even if you save the Scene.
I checked with SDK version 3.1.11 and 3.1.10.
Reverse
naqtn: I do confirm this problem seems to reappear with sdk3.1.11. The problem isn't happening through SDK 3.1.10 for me tho. Caused me to reinstall windows without thinking it could be the sdk.
LefTonbo
This also happens VCC version (SDK version: 3.1.11)
The inspector of Avatar Descriptor seems changing its internal variables frequently.
This leads the prefabs with the descriptor "Flashing" and the editor uncontrollable. Selecting a prefab with the descriptor occurs frequently saving process and opening a prefab with Prefab Editor immediately happens Auto-Save due to descriptor changes.
Example video: https://twitter.com/cube_resolve/status/1345550259221536769
It seems the inspector of Avatar Descriptor always runs
SetDirty
, I think it should be suppressed if unnecessary to prevent the problem.