using System; using Game; using UnityEngine; namespace Mono { public class UILoading : MonoBehaviour { private void Awake() { EventManager.Instance.Subscribe(GlobalInitFinishEventArgs.EventId, GlobalInitFinishEvent); } private void OnDestroy() { EventManager.Instance.Unsubscribe(GlobalInitFinishEventArgs.EventId, GlobalInitFinishEvent); } private void GlobalInitFinishEvent(object sender, GameEventArgs e) { GameObject.Destroy(this.gameObject); } } }