private void OnDestroy() { if (singleton == this) { singleton = null; } GlobalEventManager.UnregisterHandler(GlobalEventManager.DrawUpClicked, OnClickDrawUp); }
public void Initialize(DrawUpUIControl manager) { this.manager = manager; if (controlButton != null) { controlButton.onClick.AddListener(OnClickCallBack); optionText = controlButton.GetComponentInChildren <Text>(); canvas = controlButton.GetComponent <Canvas>(); } }
void Awake() { singleton = this; foreach (var o in optionUIList) { o.Initialize(this); } mCanvas = GetComponent <Canvas>(); }