Example #1
0
        void DrawDebugSettings(BuildInfo buildReportToDisplay, UnityBuildSettings settings)
        {
            DrawSettingsGroupTitle("Debug Settings");

            DrawSetting("Is development build:", settings.EnableDevelopmentBuild);
            DrawSetting("Debug Log enabled:", settings.EnableDebugLog);

            if (buildReportToDisplay.IsUnityVersionAtLeast(5, 4, 0))
            {
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);

                DrawSetting("Stack trace for regular logs:",
                            UnityBuildSettingsUtility.GetReadableStackTraceType(settings.StackTraceForLog), false);
                DrawSetting("Stack trace for warning logs:",
                            UnityBuildSettingsUtility.GetReadableStackTraceType(settings.StackTraceForWarning), false);
                DrawSetting("Stack trace for error logs:",
                            UnityBuildSettingsUtility.GetReadableStackTraceType(settings.StackTraceForError), false);
                DrawSetting("Stack trace for assert logs:",
                            UnityBuildSettingsUtility.GetReadableStackTraceType(settings.StackTraceForAssert), false);
                DrawSetting("Stack trace for exception logs:",
                            UnityBuildSettingsUtility.GetReadableStackTraceType(settings.StackTraceForException), false);
            }

            GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);

            if (IsShowingPS3Settings)
            {
                DrawSetting("Enable verbose memory stats:", settings.PS3EnableVerboseMemoryStats);

                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingiOSSettings)
            {
                if (buildReportToDisplay.IsUnityVersionAtLeast(5, 0, 0))
                {
                    DrawSetting("Log Objective-C uncaught exceptions:", settings.iOSLogObjCUncaughtExceptions);
                }

                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingWebGlSettings)
            {
                DrawSetting("Use pre-built WebGL Unity engine:", settings.WebGLUsePreBuiltUnityEngine);
                DrawSetting("Create WebGL debug symbols file:", settings.WebGLCreateDebugSymbolsFile);
                DrawSetting("WebGL exception support:", settings.WebGLExceptionSupportType);

                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }

            DrawSetting("Enable explicit null checks:", settings.EnableExplicitNullChecks);

            if (buildReportToDisplay.IsUnityVersionAtLeast(5, 4, 0))
            {
                DrawSetting("Enable explicit divide-by-zero checks:", settings.EnableExplicitDivideByZeroChecks);
            }

            if (buildReportToDisplay.IsUnityVersionAtLeast(5, 0, 0))
            {
                DrawSetting("Action on unhandled .NET exception:", settings.ActionOnDotNetUnhandledException);

                DrawSetting("Enable internal profiler:", settings.EnableInternalProfiler);

                DrawSetting("Enable CrashReport API:", settings.EnableCrashReportApi);
            }

            GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);

            DrawSetting("Auto-connect to Unity profiler:", settings.ConnectProfiler);

            DrawSetting("Allow debugger:", settings.EnableSourceDebugging);

            DrawSetting("Force script optimization on debug builds:", settings.ForceOptimizeScriptCompilation);
        }
Example #2
0
        void DrawGraphicsSettings(BuildInfo buildReportToDisplay, UnityBuildSettings settings)
        {
            DrawSettingsGroupTitle("Graphics Settings");

            DrawSetting("Use 32-bit display buffer:", settings.Use32BitDisplayBuffer);
            DrawSetting("Rendering path:", settings.RenderingPathUsed);
            DrawSetting("Color space:", settings.ColorSpaceUsed);
            DrawSetting("Use multi-threaded rendering:", settings.UseMultithreadedRendering);
            DrawSetting("Use graphics jobs:", settings.UseGraphicsJobs);
            DrawSetting("Graphics jobs mode:", settings.GraphicsJobsType);
            DrawSetting("Use GPU skinning:", settings.UseGPUSkinning);
            DrawSetting("Enable Virtual Reality Support:", settings.EnableVirtualRealitySupport);

            if (buildReportToDisplay.IsUnityVersionAtLeast(5, 2, 0))
            {
                DrawSetting("Graphics APIs Used:", settings.GraphicsAPIsUsed);
            }

            GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);

            if (IsShowingMobileSettings)
            {
                DrawSetting("Default interface orientation:", settings.MobileDefaultOrientationUsed);

                DrawSetting("Use OS screen auto-rotate:", settings.MobileEnableOSAutorotation);
                DrawSetting("Auto-rotate to portrait:", settings.MobileEnableAutorotateToPortrait);
                DrawSetting("Auto-rotate to reverse portrait:", settings.MobileEnableAutorotateToReversePortrait);
                DrawSetting("Auto-rotate to landscape left:", settings.MobileEnableAutorotateToLandscapeLeft);
                DrawSetting("Auto-rotate to landscape right:", settings.MobileEnableAutorotateToLandscapeRight);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingStandaloneSettings)
            {
                string standaloneScreenSize = settings.StandaloneDefaultScreenWidth + " x " + settings.StandaloneDefaultScreenHeight;
                DrawSetting("Default screen size:", standaloneScreenSize);
                DrawSetting("Resolution dialog:", settings.StandaloneResolutionDialogSettingUsed);

                // removed in Unity 2018
                if (buildReportToDisplay.IsUnityVersionAtLeast(2017, 0, 0))
                {
                    DrawSetting("Full-screen by default:", settings.StandaloneFullScreenByDefault);
                }

                DrawSetting("Resizable window:", settings.StandaloneEnableResizableWindow);

                // added in Unity 2018
                if (buildReportToDisplay.IsUnityVersionAtLeast(2018, 0, 0))
                {
                    DrawSetting("Fullscreen Mode:", settings.StandaloneFullScreenModeUsed);
                }

                if (IsShowingWindowsDesktopSettings)
                {
                    // not needed in Unity 5.3 since settings.GraphicsAPIsUsed shows better information
                    if (buildReportToDisplay.IsUnityVersionAtMost(5, 2, 0))
                    {
                        DrawSetting("Use Direct3D11 if available:", settings.WinUseDirect3D11IfAvailable);
                    }

                    // removed in 2017
                    if (buildReportToDisplay.IsUnityVersionAtLeast(5, 0, 0))
                    {
                        DrawSetting("Direct3D9 Fullscreen Mode:", settings.WinDirect3D9FullscreenModeUsed);
                    }

                    // removed in 2018
                    if (buildReportToDisplay.IsUnityVersionAtLeast(2017, 0, 0))
                    {
                        DrawSetting("Direct3D11 Fullscreen Mode:", settings.WinDirect3D11FullscreenModeUsed);
                    }

                    DrawSetting("Visible in background (for Fullscreen Windowed mode):", settings.VisibleInBackground);
                }
                else if (IsShowingMacSettings)
                {
                    // removed in 2018
                    if (buildReportToDisplay.IsUnityVersionAtLeast(2017, 0, 0))
                    {
                        DrawSetting("Fullscreen mode:", settings.MacFullscreenModeUsed);
                        GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
                    }
                }

                DrawSetting("Allow OS switching between full-screen and window mode:", settings.StandaloneAllowFullScreenSwitch);
                DrawSetting("Darken secondary monitors on full-screen:", settings.StandaloneCaptureSingleScreen);
                DrawSetting("Force single instance:", settings.StandaloneForceSingleInstance);

                DrawSetting("Stereoscopic Rendering:", settings.StandaloneUseStereoscopic3d);
                DrawSetting("Supported aspect ratios:", settings.AspectRatiosAllowed);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }

            if (IsShowingWebPlayerSettings)
            {
                string webScreenSize = settings.WebPlayerDefaultScreenWidth + " x " + settings.WebPlayerDefaultScreenHeight;
                DrawSetting("Screen size:", webScreenSize);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingiOSSettings)
            {
                if (buildReportToDisplay.IsUnityVersionAtMost(5, 2, 0))
                {
                    // Unity 5.3 has a Screen.resolutions but I don't know
                    // which of those in the array would be the iOS target resolution
                    DrawSetting("Target resolution:", settings.iOSTargetResolution);
                }

                if (buildReportToDisplay.IsUnityVersionAtMost(5, 1, 0))
                {
                    // not used in Unity 5.2 since settings.GraphicsAPIsUsed shows better information
                    DrawSetting("Target graphics:", settings.iOSTargetGraphics);
                }


                DrawSetting("App icon pre-rendered:", settings.iOSIsIconPrerendered);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingAndroidSettings)
            {
                if (buildReportToDisplay.IsUnityVersionAtMost(4, 0, 0))
                {
                    DrawSetting("Use 24-bit depth buffer:", settings.AndroidUse24BitDepthBuffer);
                }
                if (buildReportToDisplay.IsUnityVersionAtLeast(5, 0, 0))
                {
                    DrawSetting("Disable depth and stencil buffers:", settings.AndroidDisableDepthAndStencilBuffers);
                }
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingPS4Settings)
            {
                DrawSetting("Video out pixel format:", settings.PS4VideoOutPixelFormat);
                DrawSetting("Video out resolution:", settings.PS4VideoOutResolution);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
        }
Example #3
0
        void DrawRuntimeSettings(BuildInfo buildReportToDisplay, UnityBuildSettings settings)
        {
            DrawSettingsGroupTitle("Runtime Settings");

            if (IsShowingiOSSettings)
            {
                DrawSetting("Hide status bar:", settings.MobileHideStatusBar);
                DrawSetting("Status bar style:", settings.iOSStatusBarStyle);
                DrawSetting("Accelerometer frequency:", settings.MobileAccelerometerFrequency);
                DrawSetting("Requires persistent Wi-Fi:", settings.iOSRequiresPersistentWiFi);

                if (buildReportToDisplay.IsUnityVersionAtMost(4, 0, 0))
                {
                    DrawSetting("Exit on suspend:", settings.iOSExitOnSuspend);
                }
                if (buildReportToDisplay.IsUnityVersionAtLeast(5, 0, 0))
                {
                    DrawSetting("App-in-background behavior:", settings.iOSAppInBackgroundBehavior);
                }


                DrawSetting("Activity indicator on loading:", settings.iOSShowProgressBarInLoadingScreen);

                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingAndroidSettings)
            {
                DrawSetting("Hide status bar:", settings.MobileHideStatusBar);
                DrawSetting("Accelerometer frequency:", settings.MobileAccelerometerFrequency);
                DrawSetting("Activity indicator on loading:", settings.AndroidShowProgressBarInLoadingScreen);
                DrawSetting("Splash screen scale:", settings.AndroidSplashScreenScaleMode);

                DrawSetting("Preferred install location:", settings.AndroidPreferredInstallLocation);

                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingWebGlSettings)
            {
                DrawSetting("Automatically cache WebGL assets data:", settings.WebGLAutoCacheAssetsData);
                DrawSetting("WebGL Memory Size:", settings.WebGLMemorySize);

                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }


            if (!IsShowingiOSSettings && !IsShowingAndroidSettings && IsShowingMobileSettings)     // any mobile except iOS, Android
            {
                DrawSetting("Hide status bar:", settings.MobileHideStatusBar);
                DrawSetting("Accelerometer frequency:", settings.MobileAccelerometerFrequency);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            if (IsShowingXbox360Settings)
            {
                DrawSetting("Enable avatar:", settings.Xbox360EnableAvatar);
                DrawSetting("Enable Kinect:", settings.Xbox360EnableKinect);
                DrawSetting("Enable Kinect auto-tracking:", settings.Xbox360EnableKinectAutoTracking);

                DrawSetting("Deploy Kinect resources:", settings.Xbox360DeployKinectResources);
                DrawSetting("Deploy Kinect head orientation:", settings.Xbox360DeployKinectHeadOrientation);
                DrawSetting("Deploy Kinect head position:", settings.Xbox360DeployKinectHeadPosition);

                DrawSetting("Enable speech:", settings.Xbox360EnableSpeech);
                DrawSetting("Speech DB:", settings.Xbox360SpeechDB);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
            else if (IsShowingBlackberrySettings)
            {
                DrawSetting("Has camera permissions:", settings.BlackBerryHasCamPermissions);
                DrawSetting("Has microphone permissions:", settings.BlackBerryHasMicPermissions);
                DrawSetting("Has GPS permissions:", settings.BlackBerryHasGpsPermissions);
                DrawSetting("Has ID permissions:", settings.BlackBerryHasIdPermissions);
                DrawSetting("Has shared permissions:", settings.BlackBerryHasSharedPermissions);
            }

            if (IsShowingStandaloneSettings || IsShowingWebPlayerSettings || IsShowingBlackberrySettings)
            {
                DrawSetting("Run in background:", settings.RunInBackground);
                GUILayout.Space(SETTINGS_GROUP_MINOR_SPACING);
            }
        }