ValveSoftware / steamvr_unity_plugin

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

SteamVR v2.2b4 input window GUILayoutUtility error #261

Closed ZnelArts closed 5 years ago

ZnelArts commented 5 years ago

There are errors when generating inputs using the SteamVR Input window:

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.LayoutFromContainer (Single w, Single h) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:182)
UnityEngine.Experimental.UIElements.UIElementsUtility.EndContainerGUI () (at C:/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:164)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:272)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:335)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (IStylePainter painter) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/IMGUIContainer.cs:69)
UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect currentGlobalClip) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:532)
UnityEngine.Experimental.UIElements.Panel.PaintSubTreeChildren (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect textureClip) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:547)
UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect currentGlobalClip) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:536)
UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/Panel.cs:564)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:236)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (Int32 instanceID, IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Runtime/UIElements/Managed/UIElementsUtility.cs:78)
UnityEngine.GUIUtility.ProcessEvent (Int32 instanceID, IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUIUtility.cs:175)

Windows 10 Unity 2017.3.1f1

Repro Steps:

  1. Ceate a new project
  2. Download https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.2b4 source zip do not use the unity package as it seems that this unity package is not the correct version
  3. Open the SteamVR input window and click "Save and generate"

Expected Behavior Inputs are generated

Observed Behavior It starts generating inputs and it gets stuck while showing errors in the console.

Note The Unity package in this link https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.2b4 Seems to be an incorrect version, it doesnt contain the same files as the zip file

zite commented 5 years ago

I'll look into the errors but I don't believe these show up in other versions of Unity, which leads me to believe this is a Unity issue.

It looks like those zip files are generated from the github repo automatically. They do not contain the correct version of the package.

ZnelArts commented 5 years ago

So this version of SteamVR wont support Unity 2017.3.1f1 ?

zite commented 5 years ago

The version in the zip is not the beta, it is the version currently on the asset store. All fixes are going into the beta versions which are in the unity packages. I'll see if I can remove the zip from the page

zite commented 5 years ago

Thanks for the reports. I'm updating the beta branch again with my changes so the zip files will correctly reflect the unitypackage that is intended for people to use. The beta 5 release should fix these problems. https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.2

ZnelArts commented 5 years ago

This is working fine in b5

ZnelArts commented 5 years ago

This is also working fine in RC, you can mark this issue as fixed

zite commented 5 years ago

Think it's still broken for the released version so I'll keep it up till then. Thanks for testing again.

zite commented 5 years ago

Fixed in current release.