From abcc1de8c70de02c84d3518e5e25b830130f3587 Mon Sep 17 00:00:00 2001 From: Ader Alisma 01 Date: Sun, 29 Jun 2025 17:52:29 -0400 Subject: [PATCH] Optimisation + cleanup comments --- Assets/Scripts/Ally/AllyUpgrade.cs | 2 -- Assets/Scripts/UnitTree/DeselectManager.cs | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Assets/Scripts/Ally/AllyUpgrade.cs b/Assets/Scripts/Ally/AllyUpgrade.cs index a0352af..1b7bdc1 100644 --- a/Assets/Scripts/Ally/AllyUpgrade.cs +++ b/Assets/Scripts/Ally/AllyUpgrade.cs @@ -52,8 +52,6 @@ public class AllyUpgrade : MonoBehaviour, IPointerClickHandler if (upgradeEnfant.TryGetComponent(out UpgradePlacementButton button)) { button.Initialize(_upgradeList[i], gameObject, canvas); - //button.GetComponent().Select(); - //button.gameObject.AddComponent().Init(_instance); } } } diff --git a/Assets/Scripts/UnitTree/DeselectManager.cs b/Assets/Scripts/UnitTree/DeselectManager.cs index c4a6063..6566685 100644 --- a/Assets/Scripts/UnitTree/DeselectManager.cs +++ b/Assets/Scripts/UnitTree/DeselectManager.cs @@ -28,8 +28,7 @@ public class DeselectManager : SingletonBehaviour return; } } - Destroy(_allyUpgrade); - _allyUpgrade = null; + SetAllyUpgrade(null); } }