Inheritance: UnityEngine.MonoBehaviour
 protected virtual void OnDisable()
 {
     if (GuiSystem.IsInstanceCreated())
     {
         GuiSystem.Instance.RemoveEventReceiver(this);
     }
     _visualPanel = null;
 }
Example #2
0
 void OnDestroy()
 {
     if (_instance == this)
     {
         _instance = null;
     }
     _eventReceivers.Clear();
 }
 void OnDestroy()
 {
     if (_instance == this)
     {
         _instance          = null;
         _isInstanceCreated = false;
     }
     _eventReceivers.Clear();
 }
Example #4
0
        void Awake()
        {
            var count = FindObjectsOfType <GuiSystem> ().Length;

            if (count > 1)
            {
                DestroyImmediate(gameObject);
                return;
            }
            _instance = this;

            _lastScreenWidth  = -1;
            _lastScreenHeight = -1;

            VirtualToRealScaleFactor = 1f;

            FixScaleFactors();
        }
 void OnDestroy()
 {
     if (_instance == this) {
         _instance = null;
     }
     _eventReceivers.Clear ();
 }
        void Awake()
        {
            var count = FindObjectsOfType<GuiSystem> ().Length;
            if (count > 1) {
                DestroyImmediate (gameObject);
                return;
            }
            _instance = this;

            _lastScreenWidth = -1;
            _lastScreenHeight = -1;

            VirtualToRealScaleFactor = 1f;

            FixScaleFactors ();
        }