Пример #1
0
 private static void RequestSRDSizeGameView()
 {
     SRDSettings.LoadScreenRect();
     PlayerSettings.defaultIsNativeResolution = false;
     PlayerSettings.defaultScreenWidth        = SRDSettings.DeviceInfo.ScreenRect.Width;
     PlayerSettings.defaultScreenHeight       = SRDSettings.DeviceInfo.ScreenRect.Height;
 }
Пример #2
0
        public static void ExecuteFullScreen()
        {
            if (EditorApplication.isPlaying)
            {
                Debug.Log("SRDisplay GameView cannot be changed in Play Mode");
                return;
            }

            if (Menu.GetChecked(FullScreenMenuPath))
            {
                SRD.Editor.AsssemblyWrapper.GameView.CloseAllSRDGameView();
                Menu.SetChecked(FullScreenMenuPath, false);
            }
            else
            {
                if (!SRDSettings.LoadScreenRect())
                {
                    SRDCorePlugin.ShowMessageBox("Confirm", SRDHelper.SRDMessages.DisplayConnectionError,
                                                 Debug.LogWarning);
                    return;
                }
                if (IsWrongSettings())
                {
                    EditorApplication.update  += RequestGameViewSize;
                    OnPostClosingTempGameView += SetupGameViewAfterCloseTempGameView;
                    Menu.SetChecked(FullScreenMenuPath, true);
                    return;
                }
                SRD.Editor.AsssemblyWrapper.GameView.CloseAllUnityGameView();
                SetupGameView();
                Menu.SetChecked(FullScreenMenuPath, true);
            }
        }