public static void DisableCardboardView()
 {
     if (CardboardManager.isCardboardViewOn)
     {
         CardboardManager.SetCardboardViewOn(false);
         Screen.orientation = instance.disabledOrientation;
     }
 }
 private IEnumerator EnableCardboardViewCoroutine()
 {
     while (Screen.width < Screen.height && Screen.orientation != ScreenOrientation.LandscapeLeft)
     {
         Screen.orientation = ScreenOrientation.LandscapeLeft;
         yield return(new WaitForEndOfFrame());
     }
     CardboardManager.SetCardboardViewOn(true);
     CardboardManager.RefreshParameters();
 }
        private void Awake()
        {
            #if UNITY_IOS
            Application.targetFrameRate = 60;
            #endif

            mainCamera  = GetComponent <Camera>();
            leftCamera  = SpawnCamera(LEFT_CAMERA_NAME);
            rightCamera = SpawnCamera(RIGHT_CAMERA_NAME);

            SetupRenderTexture();

            CardboardManager.InitCardboard();
            CardboardManager.SetCardboardViewOn(false);
        }