From e81daa0302a96aa8a299d1e42886886db6e6c8ac Mon Sep 17 00:00:00 2001 From: BOT Alex <44818698+MagicBOTAlex@users.noreply.github.com> Date: Sun, 21 Apr 2024 03:21:23 +0200 Subject: [PATCH] tried to fix bug with silhouette --- Assets/Scripts/PlacementSystem/PlacementManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/PlacementSystem/PlacementManager.cs b/Assets/Scripts/PlacementSystem/PlacementManager.cs index 202a5ab..2ebbee2 100644 --- a/Assets/Scripts/PlacementSystem/PlacementManager.cs +++ b/Assets/Scripts/PlacementSystem/PlacementManager.cs @@ -5,6 +5,8 @@ using System.Linq; using Unity.Mathematics; using Unity.VisualScripting; using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; public class TowerPlacementManager : MonoBehaviour { @@ -154,7 +156,7 @@ public class TowerPlacementManager : MonoBehaviour { var comp = objScripts[i]; - if (comp is not Renderer && comp is not Transform && comp is not MeshFilter) + if (comp is not Renderer && comp is not Transform && comp is not MeshFilter && comp is not UIBehaviour) { Destroy(comp); }