private void Awake()
        {
            _adaptorSel = IAdaptorGO.GetComponent <AdaptorSelector>();
            if (_adaptorSel == null)
            {
                Msg.LogError("StartUpController cannot find AdaptorSelector");
            }

            // Switch to VR if desired
            if (GlobalData.Instance.CardboardAvailable)
            {
                // Cardboard available in Android, iOS
                if (GlobalData.Instance.CardboardRequested)
                {
                    // And we've asked for it to be active
                    Msg.Log("StartUpController.Awake: Attempting to switch to Cardboard");
                    StartCoroutine(LoadDevice("cardboard", true));
                }
                else
                {
                    // So cardboard available, but we've not asked for it, but we still load
                    // it to give us the gyroscopic camera control, essentially mono-scopic VR
                    Msg.Log("StartUpController.Awake: Attempting to switch to mono-scopic VR ( == Cardboard present but disabled)");
                    StartCoroutine(LoadDevice("cardboard", false));
                    //StartCoroutine(LoadDevice("None", true));
                    _monoscopicWithHeadTracking = true;
                }
            }
        }
Beispiel #2
0
        private void Awake()
        {
            // Extract the adaptor selector from the game object assigned in inspector
            Msg.Log("CdmCore.Awake is looking for an AdaptorSelector");
            _adaptorSelector = IAdaptorGO.GetComponent <AdaptorSelector>();

            if (_adaptorSelector == null)
            {
                Msg.LogError("CdmCore cannot find AdaptorSelector");
            }

            // Create graph pool of the appropriate family type
            if (CdmPool == null)
            {
                CdmPool = CreateNewGraph(_adaptorSelector.GetChosenAdaptor().GetFamily());
            }
        }