JJCUBER

Untitled

Jan 30th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.09 KB | None | 0 0
  1. /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*\
  2. |                                                               |
  3. |          Made by Jason Helman © Jason Tech And Games          |
  4. |   I do not condone the use of my work without my permission   |
  5. |                                                               |
  6. \*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
  7.  
  8. using UnityEngine;
  9. using UnityEditor;
  10.  
  11. public class VirtualScriptingTool : EditorWindow
  12. {
  13.     string folderPath = "";
  14.  
  15.     // Example Code
  16.  
  17.     // string myString = "Hello World";
  18.     // bool groupEnabled;
  19.     // bool myBool = true;
  20.     // float myFloat = 1.23f;
  21.  
  22.     [MenuItem("Vitrual Scripting Tool/Editor")]
  23.     private static void ShowWindow()
  24.     {
  25.         EditorWindow.GetWindow(typeof(VirtualScriptingTool));
  26.     }
  27.  
  28.     private void OnGUI()
  29.     {
  30.         // EditorGUIUtility.
  31.         // EditorGUILayout.
  32.         // GUILayout.
  33.         // EditorGUIUtility.
  34.         //GUIUtility.
  35.         // GUILayout.Label("Base Settings", EditorStyles.boldLabel);
  36.         if(GUI.Button(new Rect(500, 10, 200, 100), "Select Folder Location"))
  37.         {
  38.             folderPath = EditorUtility.OpenFolderPanel("Folder Location", "", "");
  39.             // GUI.FocusControl("");
  40.             GUI.FocusWindow(0);
  41.  
  42.         }
  43.  
  44.         folderPath = EditorGUILayout.TextField("Folder Path", folderPath);
  45.         // folderPath = GUILayout.TextField("Folder Path", folderPath);
  46.  
  47.  
  48.         // folderPath = GUI.TextField(new Rect(10, 10, 200, 100), "Folder Path", folderPath);
  49.         // path = EditorUtility.OpenFilePanel("Overwrite with png", "", "png");
  50.  
  51.  
  52.         // Example Code
  53.  
  54.         // GUILayout.Label("Base Settings", EditorStyles.boldLabel);
  55.         // myString = EditorGUILayout.TextField("Text Field", myString);
  56.  
  57.         // groupEnabled = EditorGUILayout.BeginToggleGroup("Optional Settings", groupEnabled);
  58.         // myBool = EditorGUILayout.Toggle("Toggle", myBool);
  59.         // myFloat = EditorGUILayout.Slider("Slider", myFloat, -3, 3);
  60.         // EditorGUILayout.EndToggleGroup();
  61.     }
  62. }
Add Comment
Please, Sign In to add comment