Pull request #83: Destroys unitTree onDestroy
Merge in CGD/gather-and-defend from bugfix/UnitTreeOnDeath to main * commit 'd126255f4a6c9b8422dd2d1ac6b4d970bc124b7f': Destroys unitTree onDestroy
This commit is contained in:
commit
a8ca27ebcd
@ -1,4 +1,3 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
@ -31,7 +30,7 @@ public class AllyUpgrade : MonoBehaviour, IPointerClickHandler
|
||||
AssignUpgrades(canvas);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -53,4 +52,13 @@ public class AllyUpgrade : MonoBehaviour, IPointerClickHandler
|
||||
button.Initialize(_upgradeList[i], gameObject, canvas);
|
||||
}
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_instance != null)
|
||||
{
|
||||
Destroy(_instance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user