Happens on Unity versions 2019.03.0a8 and 2019.1.11f
Really hope I’m not missing something obvious here.
Using SteamVR 2, when the ‘Open binding UI’ button is clicked (on the ‘SteamVR Input’ dialog), instead of opening a browser, I get a null reference exception in SteamVR.cs at line 352 which is:
OpenVR.Settings.SetBool(OpenVR.k_pch_SteamVR_Section, OpenVR.k_pch_SteamVR_DebugInputBinding, true, ref bindingFlagError);
All the arguments are defined as far as I can tell, so I have no idea what’s causing it.
My “fear” is that it’s because I am programming without a Vive connected, because I have yet to see a tutorial/documentation explicitly say that it doesn’t have to be.
Some background: I use Unity + SteamVR to develop simulations for graduate research at my university, and so far we’ve just been modifying existing projects without fiddling with any controller interactions, so I program the changes at home and they test it at the lab.
Any ideas?
The complete error is as follows:
NullReferenceException: Object reference not set to an instance of an object
Valve.VR.SteamVR.ShowBindingsForEditor () (at Assets/SteamVR/Scripts/SteamVR.cs:352)
Valve.VR.SteamVR_Input_EditorWindow.OpenControllerBindings () (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:522)
Valve.VR.SteamVR_Input_EditorWindow.DrawSave () (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:507)
Valve.VR.SteamVR_Input_EditorWindow.OnGUI () (at Assets/SteamVR/Input/Editor/SteamVR_Input_EditorWindow.cs:454)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at :0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) (at :0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) (at :0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at :0)
UnityEditor.HostView.Invoke (System.String methodName) (at :0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at :0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at :0)
UnityEditor.DockArea.OldOnGUI () (at :0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <96ccfa1e39384de48435317ac9a55817>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7090efd86330474bb62a23a73db98c15>:0)
Are the references to UnityEngine.UIElements from part of the process of pulling up the bindings UI in a browser?