From 0b3381b5e377a69524ae9cfe5a326881fe97c8d1 Mon Sep 17 00:00:00 2001 From: "r.nikolin" Date: Wed, 8 Nov 2023 12:10:35 +0300 Subject: [PATCH] Fix bug --- Assets/BNG Framework/Scripts/UI/VRUISystem.cs | 3 +++ 1 file changed, 3 insertions(+) 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);