Skip to content

Commit 8f17eda

Browse files
committed
Prevented issue with EventSystem.current when component is missing.
1 parent 78578e5 commit 8f17eda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Scripts/ARPlaneEvents.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void Update()
5959

6060
PlaneUpdated?.Invoke(planeVisible, lookingAtPose, lookingAtPlane);
6161

62-
if (InputManager.GetInputDown(out var currentFingerId) && !EventSystem.current.IsPointerOverGameObject(currentFingerId))
62+
if (InputManager.GetInputDown(out var currentFingerId) && EventSystem.current?.IsPointerOverGameObject(currentFingerId) != true)
6363
{
6464

6565
if (ARFoundationExtensions.HasTouchedPlane(sessionOrigin, planeManager, out var touchPose, out var touchPlane))

0 commit comments

Comments
 (0)