SteamVR 2.2.0 - External Camera - NullReferenceException?


SteamVR 2.2.0 - External Camera - NullReferenceException?


I'm working on a mixed reality project and trying to get the external camera working on Unity (2018.3.9f1) using SteamVR 2.2.0.

I get the following error when launching Play Mode:

NullReferenceException: Object reference not set to an instance of an object
Valve.VR.SteamVR_ExternalCamera.AttachToCamera (Valve.VR.SteamVR_Camera steamVR_Camera) (at Assets/SteamVR/Scripts/SteamVR_ExternalCamera.cs:141)
Valve.VR.SteamVR_Render.RenderExternalCamera () (at Assets/SteamVR/Scripts/SteamVR_Render.cs:163)
Valve.VR.SteamVR_Render+<RenderLoop>d__24.MoveNext () (at Assets/SteamVR/Scripts/SteamVR_Render.cs:146)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

I've tried both letting SteamVR instantiate the prefabs at runtime, and placing the prefabs myself and setting the references, I get the same error either way.

I've not made any modifications to the code - I just want to get an external camera tracking with a Vive Tracker.


Any help would be greatly appreciated! Thank you.