示例#1
0
 void Awake()
 {
     Debug.Log("XRGeneral Settings awakening...");
     s_RuntimeSettingsInstance = this;
     Application.quitting     += Quit;
     DontDestroyOnLoad(s_RuntimeSettingsInstance);
 }
示例#2
0
        internal static void AttemptStartXRSDKOnBeforeSplashScreen()
        {
            XRGeneralSettings instance = XRGeneralSettings.Instance;

            if (instance == null || !instance.InitManagerOnStart)
            {
                return;
            }

            instance.StartXRSDK();
        }
示例#3
0
        internal static void AttemptInitializeXRSDKOnLoad()
        {
            XRGeneralSettings instance = XRGeneralSettings.Instance;

            if (instance == null || !instance.InitManagerOnStart)
            {
                return;
            }

            instance.InitXRSDK();
        }
示例#4
0
        static void Quit()
        {
            XRGeneralSettings instance = XRGeneralSettings.Instance;

            if (instance == null)
            {
                return;
            }

            instance.DeInitXRSDK();
        }
示例#5
0
        static void Quit()
        {
            XRGeneralSettings instance = XRGeneralSettings.Instance;

            if (instance == null)
            {
                return;
            }

            instance.OnDisable();
            instance.OnDestroy();
        }
示例#6
0
        void EnterPlayMode()
        {
            if (!m_IsPlaying)
            {
                if (s_RuntimeSettingsInstance == null)
                {
                    s_RuntimeSettingsInstance = this;
                }

                InitXRSDK();
                StartXRSDK();
                m_IsPlaying = true;
            }
        }
示例#7
0
        void ExitPlayMode()
        {
            if (m_IsPlaying)
            {
                m_IsPlaying = false;
                StopXRSDK();
                DeInitXRSDK();

                if (s_RuntimeSettingsInstance != null)
                {
                    s_RuntimeSettingsInstance = null;
                }
            }
        }