File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ using UnityEditor;
2
+ using UnityEngine;
3
+ using System.Collections;
4
+ using System.Collections.Generic;
5
+
6
+ // Custom Editor Script Template
7
+ // Place this file into \Unity\Editor\Data\Resources\ScriptTemplates\ - folder
8
+ // Then you can right click over Project window and select Create/C# Editor Script
9
+ // "81a" in the filename is the menu position
10
+
11
+ public class #SCRIPTNAME# : EditorWindow
12
+ {
13
+ [MenuItem("Window/#SCRIPTNAME#")]
14
+ static void Init()
15
+ {
16
+ var window = (#SCRIPTNAME#)EditorWindow.GetWindow(typeof(#SCRIPTNAME#));
17
+ window.Show();
18
+ }
19
+
20
+ void OnGUI()
21
+ {
22
+ //TODO: Add other fields
23
+
24
+ if (GUILayout.Button("My Button"))
25
+ {
26
+ DoSomething();
27
+ }
28
+ }
29
+
30
+ void DoSomething()
31
+ {
32
+ Debug.Log("Do Something!");
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments