From a29568067f5cc5d2bbb8c29c96420b8d9b5eff5d Mon Sep 17 00:00:00 2001 From: Sveske Juice Date: Sun, 21 Apr 2024 04:09:41 +0200 Subject: [PATCH] de-select --- Assets/Scripts/PlacementSystem/CameraSlotClickDetect.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/Scripts/PlacementSystem/CameraSlotClickDetect.cs b/Assets/Scripts/PlacementSystem/CameraSlotClickDetect.cs index 102acfb..7355048 100644 --- a/Assets/Scripts/PlacementSystem/CameraSlotClickDetect.cs +++ b/Assets/Scripts/PlacementSystem/CameraSlotClickDetect.cs @@ -51,6 +51,14 @@ public class CameraSlotClickDetect : MonoBehaviour else Debug.LogWarning("TowerCam scpritet is not assigned, assign in the inspector"); } + else + { + GameManager.Instance.SelectedTower = null; + if (towerCam != null) + towerCam.ChangeToTarget(null); + else + Debug.LogWarning("TowerCam scpritet is not assigned, assign in the inspector"); + } } void ShootHoverRay()