ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 255 forks source link

ui-destroying bug in skeleton poser editor #876

Open erikbaender opened 3 years ago

erikbaender commented 3 years ago

steps to reproduce:

  1. create new unity project (tested on 2020.1.16f1 with builtin rp)
  2. import steamvr package from package manager
  3. accept incoming settings and generate input
  4. go to interaction system sample scene
  5. focus on of the throwables or anything else that has a skeleton poser script on it
  6. click on the left or right hand symbol in the skeleton poser editor to the make the preview model show up in the scene view
  7. close and reopen project

the skeleton poser will now be broken project-wide. whenever you click one of the hands to bring up the preview model, the skeleton poser UI will break into an unrecognizable mess and you'll get the following error in the console:

ArgumentException: The Object you want to instantiate is null.
UnityEngine.Object.Instantiate[T] (T original) (at <fe84f4a754da4a6bb64fca409d40938a>:0)
Valve.VR.SteamVR_Skeleton_PoserEditor.UpdatePreviewHand (UnityEditor.SerializedProperty instanceProperty, UnityEditor.SerializedProperty showPreviewProperty, UnityEngine.GameObject previewPrefab, Valve.VR.SteamVR_Skeleton_Pose_Hand handData, Valve.VR.SteamVR_Skeleton_Pose sourcePose, System.Boolean forceUpdate) (at Assets/SteamVR/Input/Editor/SteamVR_Skeleton_PoserEditor.cs:102)
Valve.VR.SteamVR_Skeleton_PoserEditor.DrawPoseEditorMenu () (at Assets/SteamVR/Input/Editor/SteamVR_Skeleton_PoserEditor.cs:598)
Valve.VR.SteamVR_Skeleton_PoserEditor.OnInspectorGUI () (at Assets/SteamVR/Input/Editor/SteamVR_Skeleton_PoserEditor.cs:442)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <c5b8ea301f1f41bf85e0302c2ee96b92>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

this is what it looks like in Unity, note the UI mess that used to be the skeleton poser in the bottom right: steamvr-broken

workoaround in case anybody else is having trouble with this: try closing and restarting steamvr and entering and exiting play mode in unity a bunch of times until the ui comes back

PatHightree commented 3 years ago

Still occurs in 2.7.0b U2020.2.0b13 with builtin rp

zite commented 3 years ago

Thanks for the report, and update. Give this a try: https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.7.1RC

Griffithe commented 3 years ago

Bug still exists! Have the same problem with Unity 2020.2 / SteamVR 2.7.2

Can also confirm the workoaround from locque as an working one! Thanks for that! Just start/restart SteamVR and click on Play. The Poser-UI should appear again. But it would be great to get it fixed. : )