diff --git a/Assets/BNG Framework/Scripts/UI/VRUISystem.cs b/Assets/BNG Framework/Scripts/UI/VRUISystem.cs index c30b6382..ce9692d3 100644 --- a/Assets/BNG Framework/Scripts/UI/VRUISystem.cs +++ b/Assets/BNG Framework/Scripts/UI/VRUISystem.cs @@ -105,6 +105,9 @@ namespace BNG { return; } + if (cameraCaster == null) + return; + EventData.position = new Vector2(cameraCaster.pixelWidth / 2, cameraCaster.pixelHeight / 2); eventSystem.RaycastAll(EventData, m_RaycastResultCache);