Ejemplo n.º 1
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            GUILayout.Space(5);
            GUIDraw.DrawSpacer();
            GUIDraw.DrawHeader(Helper.GetGUIContent("SETTINGS"), Color.yellow);
            EditorGUILayout.PropertyField(deleteBuildLogs);
            if (deleteBuildLogs.boolValue)
            {
                GUIDraw.PropertyField(deleteBuildLogsAfterDays, new GUIContent("After Days"), true);
            }
            EditorGUILayout.PropertyField(openLogManually);
            EditorGUILayout.PropertyField(normalLogOnlyFirstLineStackTrace);

            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();
            GUIDraw.DrawHeader(Helper.GetGUIContent("FONT SIZES"), Color.green);
            EditorGUILayout.PropertyField(titleFontSize);
            EditorGUILayout.PropertyField(frameFontSize);
            EditorGUILayout.PropertyField(logFontSize);
            EditorGUILayout.PropertyField(stackFontSize);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            GUIDraw.DrawSpacer();
            GUIDraw.DrawHeader(Helper.GetGUIContent("VISIBLE"), Color.green);
            EditorGUILayout.PropertyField(showOnStart);
            EditorGUILayout.PropertyField(enableCameraOnStart);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("CONTROLS"), Color.blue);
            GUIDraw.DrawShowKey(useSameEditorAsBuildShowKey, showToggleKeyEditor, showToggleKeyBuild);
            GUIDraw.DrawAdvancedKey(gamePauseKey, "Game Pause Key");
            GUIDraw.DrawAdvancedKey(followCameraKey, "Follow Camera Key");
            GUIDraw.DrawAdvancedKey(focusCameraKey, "Focus Camera Key");
            GUIDraw.DrawAdvancedKey(alignWithViewKey, "Align With View Key");
            GUIDraw.DrawAdvancedKey(moveToViewKey, "Move To View Key");

            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("CAMERA"), Color.yellow);
            EditorGUILayout.PropertyField(selectLayerMask);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("SETTINGS"), Color.red);
            EditorGUILayout.PropertyField(unfoldMultipleScenesOnStart);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("EVENTS"), Color.grey);
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("onSetActive", "This event will execute when the Runtime Inspector will show/hide.\n\nYou can subscribe/unsubscribe to RuntimeInspector.onSetActive"));
            EditorGUILayout.LabelField(new GUIContent("(bool active)", ""));
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("onTimeScaleChanged", "This event will execute when changing the time-scale slider.\n\nYou can subscribe/unsubscribe to RuntimeInspector.onTimeScaleChanged"));
            EditorGUILayout.LabelField(new GUIContent("(float timeScale)", ""));
            EditorGUILayout.EndVertical();
            EditorGUILayout.EndHorizontal();

            GUIDraw.DrawSpacer();

            serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            var windowManager = (WindowManager)target;

            serializedObject.Update();
            serializedWindowData.Update();

            DrawSpacer(5, 5, 0);
            products.Draw((MonoBehaviour)target);

            // base.OnInspectorGUI();
            // EditorGUILayout.BeginHorizontal();
            GUI.backgroundColor = Color.green * GUIDraw.editorSkinMulti;
            if (GUILayout.Button("Open Documentation"))
            {
                Application.OpenURL("http://www.terraincomposer.com/de-documentation/");
            }
            GUI.backgroundColor = Color.white;
            DrawSpacer(2, 5, 1);
            GUI.backgroundColor = Color.magenta * GUIDraw.editorSkinMulti;
            if (GUILayout.Button(new GUIContent("Quick Discord Support", "With instant chatting I'm able to give very fast support.\nWhen I'm online I try to answer right away.")))
            {
                Application.OpenURL("https://discord.gg/HhepjD9");
            }
            GUI.backgroundColor = Color.white;
            // EditorGUILayout.EndHorizontal();
            DrawSpacer(2, 5, 1);
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Open Editor Logs"))
            {
                EditorUtility.RevealInFinder(Helper.GetConsoleLogPath());
                // Application.OpenURL("file://" + Application.consoleLogPath);
            }
            if (GUILayout.Button("Open Build Logs"))
            {
                // EditorUtility.RevealInFinder(Application.persistentDataPath + "/Player.log");
                Application.OpenURL("file://" + Application.persistentDataPath);
            }
            GUILayout.EndHorizontal();
            DrawSpacer(2, 5, 2);

            GUIDraw.DrawHeader(Helper.GetGUIContent("SETTINGS"), Color.green);
            GUI.changed = false;

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("Only Use View Toggle Keys", "This disables all other keys except the ones to display the Runtime Console and Runtime Inspector."));
            EditorGUILayout.PropertyField(onlyUseViewToggleKeys, GUIContent.none);
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("Use DontDestroyOnLoad Scene", "This will put this Debugging Essentials GameObject as don't destroy on load and will display the 'DontDestroyOnLoad' Scane."));
            EditorGUILayout.PropertyField(useDontDestroyOnLoadScene, GUIContent.none);
            EditorGUILayout.EndHorizontal();
            if (GUI.changed)
            {
                if (Application.isPlaying && useDontDestroyOnLoadScene.boolValue)
                {
                    DontDestroyOnLoad(windowManager.gameObject);
                }
            }

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("Use Canvas", "This will draw the OnGUI on a canvas so that it can be used in VR and Hololens."));
            GUI.changed = false;
            EditorGUILayout.PropertyField(useCanvas, GUIContent.none);
            if (GUI.changed)
            {
                windowManager.UpdateUseCanvas(useCanvas.boolValue);
            }
            EditorGUILayout.EndHorizontal();

            GUI.changed = false;
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("GUI Scale", "GUI scale of the Runtime Windows"));
            EditorGUILayout.Slider(guiScaleValue, 0.55f, 10f, GUIContent.none);
            if (GUI.changed)
            {
                guiScaleText.stringValue = guiScaleValue.floatValue.ToString();
            }
            if (GUILayout.Button(new GUIContent("R", "Reset the scale to 1"), GUILayout.Width(25)))
            {
                guiScaleValue.floatValue = 1;
                guiScaleText.stringValue = "1";
            }
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.EndVertical();
            DrawSpacer(2, 5, 2);

            serializedWindowData.ApplyModifiedProperties();
            serializedObject.ApplyModifiedProperties();
        }
Ejemplo n.º 4
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            GUIDraw.DrawSpacer();
            GUIDraw.DrawHeader(Helper.GetGUIContent("VISIBLE"), Color.green);
            EditorGUILayout.LabelField("Show Console");
            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(showConsoleOnStart, Helper.GetGUIContent("On Start"));
            EditorGUILayout.PropertyField(showConsoleOnWarning, Helper.GetGUIContent("On Warning"));
            EditorGUILayout.PropertyField(showConsoleOnError, Helper.GetGUIContent("On Error"));
            EditorGUILayout.PropertyField(showConsoleOnException, Helper.GetGUIContent("On Exception"));
            EditorGUILayout.PropertyField(showConsoleWhenInvokingMethod, Helper.GetGUIContent("When Invoking Method", "Show the Console when invoking a method from the Runtime Inspector"));
            EditorGUI.indentLevel--;
            EditorGUILayout.PropertyField(disableUnityDevelopmentConsole);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("CONTROLS"), Color.cyan);
            GUIDraw.DrawShowKey(useSameEditorAsBuildShowKey, showToggleKeyEditor, showToggleKeyBuild);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("SETTINGS"), Color.blue);
            EditorGUILayout.PropertyField(ignoreCasesInCommands);
            EditorGUILayout.PropertyField(ignoreCasesInAutoCompleteInput);
            EditorGUILayout.PropertyField(adminModeInBuild);
            EditorGUILayout.PropertyField(adminModeConsoleCommand);
            EditorGUILayout.PropertyField(specialModeInBuild);
            EditorGUILayout.PropertyField(specialModeConsoleCommand);
            EditorGUILayout.PropertyField(testOnlyFreeConsoleCommands);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("SEARCH CONSOLE"), Color.yellow);
            EditorGUILayout.PropertyField(searchCommandPrefix);
            EditorGUILayout.PropertyField(ignoreCasesInSearch);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("NETWORK COMMAND PREFIX"), Color.red);
            EditorGUILayout.PropertyField(executeOnAllPrefix);
            EditorGUILayout.PropertyField(executeOnlyOnRemotePrefix);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("FONT SIZES"), Color.magenta);
            EditorGUILayout.PropertyField(titleFontSize);
            EditorGUILayout.PropertyField(frameFontSize);
            EditorGUILayout.PropertyField(logFontSize);
            EditorGUILayout.PropertyField(stackFontSize);
            EditorGUILayout.EndVertical();
            GUIDraw.DrawSpacer();

            GUIDraw.DrawHeader(Helper.GetGUIContent("EVENTS"), Color.grey);

            EditorGUILayout.EndVertical();
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("onSetActive", "This event will execute when the Runtime Console will show/hide.\n\nYou can subscribe/unsubscribe to RuntimeConsole.onSetActive"));
            EditorGUILayout.LabelField(new GUIContent("(bool active)", ""));
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.PrefixLabel(new GUIContent("onRemoteCommand", "This event will execute when using the `Network command prefixes`.\n\nYou can subscribe/unsubscribe to RuntimeConsole.onRemoteCommand"));
            EditorGUILayout.LabelField(new GUIContent("(string command)", ""));
            EditorGUILayout.EndHorizontal();
            GUIDraw.DrawSpacer();


            serializedObject.ApplyModifiedProperties();
        }