Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*\
- | |
- | Made by Jason Helman © Jason Tech And Games |
- | I do not condone the use of my work without my permission |
- | |
- \*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
- using UnityEngine;
- using UnityEditor;
- public class VirtualScriptingTool : EditorWindow
- {
- string folderPath = "";
- // Example Code
- // string myString = "Hello World";
- // bool groupEnabled;
- // bool myBool = true;
- // float myFloat = 1.23f;
- [MenuItem("Vitrual Scripting Tool/Editor")]
- private static void ShowWindow()
- {
- EditorWindow.GetWindow(typeof(VirtualScriptingTool));
- }
- private void OnGUI()
- {
- // EditorGUIUtility.
- // EditorGUILayout.
- // GUILayout.
- // EditorGUIUtility.
- //GUIUtility.
- // GUILayout.Label("Base Settings", EditorStyles.boldLabel);
- if(GUI.Button(new Rect(500, 10, 200, 100), "Select Folder Location"))
- {
- folderPath = EditorUtility.OpenFolderPanel("Folder Location", "", "");
- // GUI.FocusControl("");
- GUI.FocusWindow(0);
- }
- folderPath = EditorGUILayout.TextField("Folder Path", folderPath);
- // folderPath = GUILayout.TextField("Folder Path", folderPath);
- // folderPath = GUI.TextField(new Rect(10, 10, 200, 100), "Folder Path", folderPath);
- // path = EditorUtility.OpenFilePanel("Overwrite with png", "", "png");
- // Example Code
- // GUILayout.Label("Base Settings", EditorStyles.boldLabel);
- // myString = EditorGUILayout.TextField("Text Field", myString);
- // groupEnabled = EditorGUILayout.BeginToggleGroup("Optional Settings", groupEnabled);
- // myBool = EditorGUILayout.Toggle("Toggle", myBool);
- // myFloat = EditorGUILayout.Slider("Slider", myFloat, -3, 3);
- // EditorGUILayout.EndToggleGroup();
- }
- }
Add Comment
Please, Sign In to add comment