From 01c175a6aee1806b79d4dd06c667f9e9aa164aeb Mon Sep 17 00:00:00 2001 From: stilnat Date: Sun, 11 Feb 2024 22:24:37 +0100 Subject: [PATCH] fix exception --- Assets/Scripts/SS3D/Systems/Selection/SelectionCamera.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/SS3D/Systems/Selection/SelectionCamera.cs b/Assets/Scripts/SS3D/Systems/Selection/SelectionCamera.cs index ab02996a6..7b8170647 100644 --- a/Assets/Scripts/SS3D/Systems/Selection/SelectionCamera.cs +++ b/Assets/Scripts/SS3D/Systems/Selection/SelectionCamera.cs @@ -1,9 +1,6 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; +using UnityEngine; using SS3D.Core.Behaviours; using SS3D.Core; -using UnityEngine.UI; using UnityEngine.Experimental.Rendering; using UnityEngine.InputSystem; using InputSystem = SS3D.Systems.Inputs.InputSystem; @@ -105,7 +102,7 @@ private void OnPostRender() } else { - _readbackTexture.ReadPixels(new Rect(pos.x, Screen.height - pos.y, 1, 1), 0, 0, false); + _readbackTexture.ReadPixels(new Rect(pos.x, Screen.height-pos.y-1, 1, 1), 0, 0, false); col = _readbackTexture.GetPixel(0, 0); }