Parameter Driver editor sometimes causes broken Animator windows
tracked
McArdellje
Having an inspector open to a state that has a Parameter Driver will sometimes cause unity to spawn broken Animator windows and occasionally these will turn into "Failed to load..."
Attached are a few images of the symptoms of this bug
Nerd information:
in
AvatarParameterDriverEditor.GetCurrentController
, EditorWindow.GetWindow
is called with focus = true (implicitly), this causes EditorWindow.Show
to be called on the window which does nothing if the window's m_Parent is set, but in very rare occasions during domain reloads (usually due to entering play mode) m_Parent is null, this causes unity to try spawning a new actual window for the AnimatorControllerTool
, which ends up with the AnimatorControllerTool
existing in multiple places at once which makes a lot of the unity windowing system to break, these duplicates continue to pile up during repeated domain reloads and can only be cleared via either a unity restart or layout reload.This is obviously caused by some form of internal unity bug but the VRChat SDK should also not be calling
GetWindow
with focus = true or calling GetWindow
at all because GetWindow
will create a window if one does not exist causing the inspector window to spawn an animator window when it is interacted with, this is clearly not desired behaviour.Resources.FindObjectsOfTypeAll
should be used instead to find an AnimatorControllerTool
without creating or focusing a window.It might be even better to use
AssetDatabase.GetAssetPath
and AssetDatabase.LoadAssetAtPath<AnimatorController>
to get the controller that contains the VRCAvatarParameterDriver
directly.Log In
StormRel
tracked
ZenithVal
Ran into this. Glad my project is a little less likely to be haunted.
McArdellje
sorry, forgot to include reproduction steps.
Basic reproduction steps:
have animator window open, have inspector open to VRCParameterDriver, trigger domain reload somehow (e.g. entering play mode)
still not guaranteed to occur every time, but once it happens once then each subsequent domain reload seems to create another broken window
also repro steps for the less problematic symptoms of this bug:
do not have an animator window open, have inspector open to VRCParameterDriver. now if you trigger a domain reload an animator window will spawn
have an animator window open but not focused, have inspector open to VRCParameterDriver, hover over inspector and animator window will be forcefully focused
ChadHendrixs
I was running into this EXACT issue the other day and thought I was going crazy. It's hella annoying and isn't fixed by restarting the editor.
Lunar | Void
Animator my beloved