Beispiel #1
0
        protected override void RealFix(FoveSettings settings)
        {
            string[] devices = GetSupportedDevices();
            string[] new_devices;

            bool skipCopy = false;

            if (devices.Length == 1 && devices[0] == "None")
            {
                new_devices = new string[1];
                skipCopy    = true;
            }
            else
            {
                new_devices = new string[devices.Length + 1];
            }

            int i = 1;

            new_devices[0] = "split";
            if (!skipCopy)
            {
                foreach (var device in devices)
                {
                    new_devices[i++] = device;
                }
            }

#if UNITY_5_5_OR_NEWER
            UnityEditorInternal.VR.VREditor.SetVREnabledDevicesOnTargetGroup(BuildTargetGroup.Standalone, new_devices);
#else
            UnityEditorInternal.VR.VREditor.SetVREnabledDevices(BuildTargetGroup.Standalone, new_devices);
#endif
        }
Beispiel #2
0
 protected override void RealFix(FoveSettings settings)
 {
     string[] qualityNames = QualitySettings.names;
     for (int i = 0; i < qualityNames.Length; i++)
     {
         QualitySettings.SetQualityLevel(i);
         QualitySettings.vSyncCount = 0;
     }
 }
Beispiel #3
0
        public bool IsOkay(FoveSettings settings, bool force = false)         // return false if the suggestion applies
        {
            if (force || !m_hasChecked)
            {
                m_CachedCheck = RealIsOkay(settings);
                m_hasChecked  = true;
            }

            return(m_CachedCheck);
        }
Beispiel #4
0
        protected override void RealFix(FoveSettings settings)
        {
            PlayerSettings.virtualRealitySupported = true;

            var splitDevice_Requirement = new RequireSplitVrDevice_Suggestion();

            if (!splitDevice_Requirement.IsOkay(settings, true))
            {
                splitDevice_Requirement.Fix(settings);
            }
        }
Beispiel #5
0
        protected override bool RealIsOkay(FoveSettings settings)
        {
            if (settings.interfaceChoice == InterfaceChoice.DualCameras)
            {
                return(true);
            }

            return(PlayerSettings.stereoRenderingPath == StereoRenderingPath.SinglePass
#if UNITY_5_5_OR_NEWER
                   || PlayerSettings.stereoRenderingPath == StereoRenderingPath.Instancing
#endif
                   );
        }
Beispiel #6
0
        protected override bool RealIsOkay(FoveSettings settings)
        {
            string[] qualityNames = QualitySettings.names;
            for (int i = 0; i < qualityNames.Length; i++)
            {
                QualitySettings.SetQualityLevel(i);
                if (QualitySettings.vSyncCount > 0)
                {
                    return(false);
                }
            }

            return(true);
        }
Beispiel #7
0
        static void RunOnce()
        {
            // Only run this once from the delegate
            EditorApplication.update -= RunOnce;

            m_Settings = GetSettings();
            // In order to show settings:
            // * showAutomatically must be true OR no settings file exists
            // * at least one suggestion must be applicable
            if ((m_Settings == null || m_Settings.showAutomatically) && NeedsAnySuggestions())
            {
                EditSettings();
            }
        }
Beispiel #8
0
        protected override bool RealIsOkay(FoveSettings settings)
        {
#if UNITY_5_5_OR_NEWER
            //var low_graphics = UnityEditor.Rendering.EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, UnityEngine.Rendering.GraphicsTier.Tier1);
            //var mid_graphics = UnityEditor.Rendering.EditorGraphicsSettings.GetTierSettings(BuildTargetGroup.Standalone, UnityEngine.Rendering.GraphicsTier.Tier2);
            var high_graphics = UnityEditor.Rendering.EditorGraphicsSettings.GetTierSettings(
                BuildTargetGroup.Standalone,
                UnityEngine.Rendering.GraphicsTier.Tier3);

            return(high_graphics.renderingPath == RenderingPath.Forward);
#else
            return(PlayerSettings.renderingPath == RenderingPath.Forward);
#endif
        }
Beispiel #9
0
        protected override void RealFix(FoveSettings settings)
        {
#if UNITY_5_5_OR_NEWER
            var high_graphics = UnityEditor.Rendering.EditorGraphicsSettings.GetTierSettings(
                BuildTargetGroup.Standalone,
                UnityEngine.Rendering.GraphicsTier.Tier3);
            high_graphics.renderingPath = RenderingPath.Forward;
            UnityEditor.Rendering.EditorGraphicsSettings.SetTierSettings(
                BuildTargetGroup.Standalone,
                UnityEngine.Rendering.GraphicsTier.Tier3,
                high_graphics);
#else
            PlayerSettings.renderingPath = RenderingPath.Forward;
#endif
        }
Beispiel #10
0
        protected override void RealFix(FoveSettings settings)
        {
            bool success = false;

#if UNITY_5_6_OR_NEWER
            success = EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows64);
#else
            success = EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.StandaloneWindows64);
#endif

            if (!success)
            {
                EditorUtility.DisplayDialog("Error Changing Build Settings",
                                            "Switch settings function returned false...", "Okay");
            }
        }
Beispiel #11
0
        protected override bool RealIsOkay(FoveSettings settings)
        {
            string[] devices = GetSupportedDevices();
            if (settings.interfaceChoice != InterfaceChoice.VrRenderPath)
            {
                return(true);
            }
            if (PlayerSettings.virtualRealitySupported != true)
            {
                return(true);                // we cannot determine if this suggestion applies when VR is disabled
            }
            for (int i = 0; i < devices.Length; i++)
            {
                if (devices[i] == "split")
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #12
0
 protected override void RealFix(FoveSettings settings)
 {
     PlayerSettings.stereoRenderingPath = StereoRenderingPath.SinglePass;
 }
Beispiel #13
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(!PlayerSettings.virtualRealitySupported || settings.interfaceChoice != InterfaceChoice.DualCameras);
 }
Beispiel #14
0
 protected override void RealFix(FoveSettings settings)
 {
     QualitySettings.antiAliasing = 4;
 }
Beispiel #15
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(QualitySettings.antiAliasing >= 4);
 }
Beispiel #16
0
 protected override void RealFix(FoveSettings settings)
 {
     PlayerSettings.virtualRealitySupported = false;
 }
Beispiel #17
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(EditorUserBuildSettings.activeBuildTarget == BuildTarget.StandaloneWindows64);
 }
Beispiel #18
0
 private void OnEnable()
 {
     m_Settings     = GetSettings();
     m_forceCheck   = true;
     wantsMouseMove = true;
 }
Beispiel #19
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(PlayerSettings.virtualRealitySupported || settings.interfaceChoice != InterfaceChoice.VrRenderPath);
 }
Beispiel #20
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(PlayerSettings.resizableWindow == false);
 }
Beispiel #21
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(PlayerSettings.displayResolutionDialog == ResolutionDialogSetting.Disabled);
 }
Beispiel #22
0
 protected override void RealFix(FoveSettings settings)
 {
     PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Disabled;
 }
Beispiel #23
0
 protected abstract bool RealIsOkay(FoveSettings settings);
Beispiel #24
0
 protected override void RealFix(FoveSettings settings)
 {
     PlayerSettings.resizableWindow = false;
 }
Beispiel #25
0
 protected override bool RealIsOkay(FoveSettings settings)
 {
     return(PlayerSettings.visibleInBackground);
 }
Beispiel #26
0
 protected override void RealFix(FoveSettings settings)
 {
     PlayerSettings.visibleInBackground = true;
 }
Beispiel #27
0
 protected abstract void RealFix(FoveSettings settings);
Beispiel #28
0
 public void Fix(FoveSettings settings)
 {
     RealFix(settings);
 }
Beispiel #29
0
        protected override void RealFix(FoveSettings settings)
        {
#if UNITY_5_5_OR_NEWER
            PlayerSettings.stereoRenderingPath = StereoRenderingPath.SinglePass;
#endif
        }