'Unity SteamVR build returning NullReferenceException error despite functioning in editor
I made a game using the SteamVR plugin in unity 2021.3.1f1. It functions perfectly in the editor, however on build the controllers aren't visible and don't track. The program loads a bunch of OpenVR stuff on startup, then it returns this error Twice:
<b>[SteamVR]</b> System.NullReferenceException: Object reference not set to an instance of an object.
at Valve.VR.SteamVR_Input.Initialize (System.Boolean force) [0x00000] in <00000000000000000000000000000000>:0
at Valve.VR.SteamVR.CreateInstance () [0x00000] in <00000000000000000000000000000000>:0
at Valve.VR.SteamVR.Initialize (System.Boolean forceUnityVRMode) [0x00000] in <00000000000000000000000000000000>:0
at Valve.VR.SteamVR_Behaviour_Pose.OnEnable () [0x00000] in <00000000000000000000000000000000>:0
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Valve.VR.SteamVR:CreateInstance()
Valve.VR.SteamVR:Initialize(Boolean)
Valve.VR.SteamVR_Behaviour_Pose:OnEnable()
Then it returns this error twice:
UnityEngine.Logger:Log(LogType, Object, Object)
UnityEngine.Debug:LogError(Object, Object)
Valve.VR.SteamVR_Behaviour_Pose:Start()
Then it returns this error once per frame:
NullReferenceException: Object reference not set to an instance of an object.
at Valve.VR.SteamVR_Action_Boolean.GetState (Valve.VR.SteamVR_Input_Sources inputSource) [0x00000] in <00000000000000000000000000000000>:0
at ButtonInteractor.FixedUpdate () [0x00000] in <00000000000000000000000000000000>:0
I have checked my "ButtonInteractor" script and found no issues, as well as reinstalled steamvr, adjusted and rewrote input bindings, and there has been no change. Is there something i nee dot do to get steamvr to build properly?
Any ideas as to what I did wrong?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
