private void OnDestroy() { BasePanel basePanel = this.GetComponentInParent <BasePanel>(); basePanel?.UnRegisterUIControl(this.gameObject.name); }
private void Awake() { BasePanel basePanel = this.GetComponentInParent <BasePanel>(); basePanel.RegisterUIControl(this.gameObject.name, this); }