From f80bee5150b2407139ca11bd0fcdb31d7014d8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dino=20Fejzagi=C4=87?= Date: Fri, 17 May 2024 14:32:03 +0200 Subject: [PATCH] Fix FocusProvider warning when using SRP --- Runtime/Input/Modules/FocusProvider.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Runtime/Input/Modules/FocusProvider.cs b/Runtime/Input/Modules/FocusProvider.cs index 672ddd06..089f8638 100644 --- a/Runtime/Input/Modules/FocusProvider.cs +++ b/Runtime/Input/Modules/FocusProvider.cs @@ -606,7 +606,12 @@ private void EnsureUiRaycastCameraSetup() uiRaycastCamera.allowMSAA = false; uiRaycastCamera.allowDynamicResolution = false; uiRaycastCamera.targetDisplay = 0; - uiRaycastCamera.stereoTargetEye = StereoTargetEyeMask.Both; + + if (RenderPipelineUtilities.GetActiveRenderingPipeline() == RealityToolkit.Definitions.Utilities.UnityRenderPipeline.Legacy) + { + uiRaycastCamera.stereoTargetEye = StereoTargetEyeMask.Both; + } + uiRaycastCamera.cullingMask = Camera.main.cullingMask; if (uiRaycastCameraTargetTexture == null)