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); } }