/// <summary> /// Compile the Input part to Input inspector. /// </summary> private void Part_Input() { GUILayout.Label("Gamepad", EditorStyles.boldLabel); JCS_InputController.SelectGamepadType = EditorGUILayout.Popup("Gamepad Type", JCS_InputController.SelectGamepadType, JCS_InputController.GamepadPlatform); JCS_InputController.GAMEPAD_COUNT = (int)EditorGUILayout.Slider("Gamepad Count", JCS_InputController.GAMEPAD_COUNT, 0, JCS_InputSettings.MAX_JOYSTICK_COUNT); GUILayout.Label("Input Manager", EditorStyles.boldLabel); JCSUnity_EditortUtil.BeginHorizontal(() => { if (GUILayout.Button("Update")) { UpdateInputManager(); } if (GUILayout.Button("Clear")) { ClearInputManager(); } if (GUILayout.Button("Revert")) { RevertDefaultInputManager(); } }); }
private void OnGUI() { ReadINIFile(); // Informations JCSUnity_EditortUtil.BeginHorizontal(() => { GUILayout.Label("Author: ", EditorStyles.boldLabel); GUILayout.Label(EDITOR_INI["author"]); }); JCSUnity_EditortUtil.BeginHorizontal(() => { GUILayout.Label("Email: ", EditorStyles.boldLabel); GUILayout.Label(EDITOR_INI["email"]); }); JCSUnity_EditortUtil.BeginHorizontal(() => { GUILayout.Label("Version: ", EditorStyles.boldLabel); GUILayout.Label(EDITOR_INI["version"]); }); JCSUnity_EditortUtil.BeginHorizontal(() => { GUILayout.Label("Source: ", EditorStyles.boldLabel); if (GUILayout.Button(EDITOR_INI["url"], "Label")) { string url = EDITOR_INI["url"]; Application.OpenURL(url); } }); }
private void Init() { if (prefsLoaded) { return; } JCS_InputController.GAMEPAD_COUNT = EditorPrefs.GetInt(JCSUnity_EditortUtil.FormKey("GAMEPAD_COUNT"), 0); JCS_InputController.SelectGamepadType = EditorPrefs.GetInt(JCSUnity_EditortUtil.FormKey("SelectGamepadType"), 0); prefsLoaded = true; }
/// <summary> /// Initialize the base object part buttons. /// </summary> private void Part_Basic() { GUILayout.Label("Managers / Settings", EditorStyles.boldLabel); JCSUnity_EditortUtil.BeginHorizontal(() => { if (GUILayout.Button("Create Settings")) { CreateSettings(); } if (GUILayout.Button("Create Managers")) { CreateManagers(); } }); GUILayout.Label("Camera", EditorStyles.boldLabel); JCSUnity_EditortUtil.BeginHorizontal(() => { if (GUILayout.Button("Create 2D camera")) { Create2DCamera(); } if (GUILayout.Button("Create 3D camera")) { Create3DCamera(); } }); GUILayout.Label("Canvas", EditorStyles.boldLabel); if (GUILayout.Button("Create Canvas")) { CreateJCSCanvas(); } GUILayout.Label("Background Music", EditorStyles.boldLabel); if (GUILayout.Button("Create BGM Player")) { CreateBGMPlayer(); } GUILayout.Label("Debug Tools", EditorStyles.boldLabel); if (GUILayout.Button("Create Debug Tools")) { CreateDebugTools(); } }
/// <summary> /// Initialize the one click serialize part buttons. /// </summary> private void Part_Scene() { JCSUnity_EditortUtil.BeginHorizontal(() => { if (GUILayout.Button("Convert to 2D scene")) { ConvertTo2D(); } if (GUILayout.Button("Convert to 3D scene")) { ConvertTo3D(); } }); }
/// <summary> /// Compile the GUI part to Unity's GUI inspector. /// </summary> private void Part_GUI() { GUILayout.Label("Cursor", EditorStyles.boldLabel); JCSUnity_EditortUtil.BeginHorizontal(() => { if (GUILayout.Button("Create 2D Cursor")) { Create2DCurosr(); } if (GUILayout.Button("Create 3D Cursor")) { Create3DCurosr(); } }); GUILayout.Label("Panel", EditorStyles.boldLabel); if (GUILayout.Button("Create Base Panel")) { CreateBasePanel(); } if (GUILayout.Button("Create Dialogue Panel")) { CreateDialoguePanel(); } if (GUILayout.Button("Create Tween Panel")) { CreateTweenPanel(); } if (GUILayout.Button("Create Slide Panel 9x9 - 16:9")) { CreateSlidePanel(); } GUILayout.Label("Undo/Redo", EditorStyles.boldLabel); if (GUILayout.Button("Create Undo Redo System")) { CreateUndoRedoSystem(); } }
private void Draw() { mFO_Scene = EditorGUILayout.Foldout(mFO_Scene, "Scene"); if (mFO_Scene) { JCSUnity_EditortUtil.CreateGroup(Part_Scene); } mFO_Basic = EditorGUILayout.Foldout(mFO_Basic, "Basic"); if (mFO_Basic) { JCSUnity_EditortUtil.CreateGroup(Part_Basic); } mFO_GUI = EditorGUILayout.Foldout(mFO_GUI, "GUI"); if (mFO_GUI) { JCSUnity_EditortUtil.CreateGroup(Part_GUI); } mFO_Effect = EditorGUILayout.Foldout(mFO_Effect, "Effect"); if (mFO_Effect) { JCSUnity_EditortUtil.CreateGroup(Part_Effect); } mFO_ARVR = EditorGUILayout.Foldout(mFO_ARVR, "AR / VR"); if (mFO_ARVR) { JCSUnity_EditortUtil.CreateGroup(Part_ARVR); } mFO_Input = EditorGUILayout.Foldout(mFO_Input, "Input"); if (mFO_Input) { JCSUnity_EditortUtil.CreateGroup(Part_Input); } mFO_Tool = EditorGUILayout.Foldout(mFO_Tool, "Tool"); if (mFO_Tool) { JCSUnity_EditortUtil.CreateGroup(Part_Tool); } }
private void SavePref() { EditorPrefs.SetInt(JCSUnity_EditortUtil.FormKey("GAMEPAD_COUNT"), JCS_InputController.GAMEPAD_COUNT); EditorPrefs.SetInt(JCSUnity_EditortUtil.FormKey("SelectGamepadType"), JCS_InputController.SelectGamepadType); }