示例#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);
            }
        }
示例#3
0
        private void CreateDisplayEdges()
        {
            if (_displayEdges != null)
            {
                return;
            }
            SRDSettings.LoadBodyBounds();
            var dispEdges = new List <GameObject>();

            foreach (var edge in Utils.SRDSettings.DeviceInfo.BodyBounds.EdgePositions)
            {
                var go = new GameObject();
                go.transform.SetParent(this.transform);
                go.transform.localPosition = edge;
                go.transform.localRotation = Quaternion.identity;
                go.hideFlags = HideFlags.HideAndDontSave;
                dispEdges.Add(go);
            }
            _displayEdges = new Utils.DisplayEdges(dispEdges[0].transform, dispEdges[1].transform,
                                                   dispEdges[2].transform, dispEdges[3].transform);
        }