public virtual void Awake()
 {
     if (_instance != null)
     {
         Debug.LogWarning("FPEMenu:: Duplicate instance of FPEMenu called '" + _instance.gameObject.name + "', deleting.");
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }
Esempio n. 2
0
        public virtual void Awake()
        {
            if (_instance != null)
            {
                Debug.LogWarning("FPEMenu:: Duplicate instance of FPEMenu called '" + _instance.gameObject.name + "', deleting.");
                Destroy(this.gameObject);
            }
            else
            {
                _instance = this;
                DontDestroyOnLoad(this.gameObject);
            }

            menuActive = false;

            myEventSystem = FPEEventSystem.Instance.gameObject.GetComponent <EventSystem>();
            if (!myEventSystem)
            {
                Debug.LogError("FPEMenu:: There is no FPEEventSystem in the scene!");
            }
        }