/// <summary>Disables the custom citizen info panel, if it is enabled.</summary>
        protected sealed override void DisableCore()
        {
            if (scheduleLabel == null)
            {
                return;
            }

            ItemsPanel.RemoveUIComponent(scheduleLabel);
            UnityEngine.Object.Destroy(scheduleLabel.gameObject);
            scheduleLabel = null;
        }
Example #2
0
        protected override void DisableCore()
        {
            foreach (var button in createdButtons)
            {
                button.eventClick -= AdditionalButtonClick;
                ItemsPanel.RemoveUIComponent(button);
                UnityEngine.Object.Destroy(button);
            }

            createdButtons.Clear();
            additionalButtons.Clear();
        }