/// <summary> Initialize the BackButton Instance </summary>
 public static void Init()
 {
     if (s_initialized || s_instance != null)
     {
         return;
     }
     s_instance = Instance;
 }
예제 #2
0
        private void Awake()
        {
            if (s_instance != null && s_instance != this)
            {
                DDebug.Log("There cannot be two '" + GetType().Name + "' active at the same time. Destroying this one!");
                Destroy(gameObject);
                return;
            }

            s_instance = this;
            DontDestroyOnLoad(gameObject);

            if (BackButtonInputData == null)
            {
                BackButtonInputData = GetBackButtonInputData();
            }
            m_lastBackButtonPressTime = Time.realtimeSinceStartup;
        }