Skip to content

Commit a6c3b53

Browse files
author
Thomas Hummes
committed
2 parents 079c395 + 8792f98 commit a6c3b53

File tree

1 file changed

+1
-89
lines changed

1 file changed

+1
-89
lines changed

README.md

Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,4 @@
11
# UnityEditorHelper
22
An organized bunch of scripts to make editor scripting in Unity easier - gathered from some of my projects and other free sources
33

4-
## Samples
5-
6-
### HighlightBox
7-
A box with round edges that can be colored and used to highlight some components
8-
9-
![Imgur](http://i.imgur.com/41b7dYL.png)
10-
11-
```csharp
12-
using (new HighlightBox())
13-
{
14-
EditorGUILayout.Slider("Range property", 5, 0, 10);
15-
EditorGUILayout.TextField("Sample Field", GUILayout.Height(150));
16-
EditorGUILayout.ObjectField("Object Field", null, typeof (Transform), true);
17-
}
18-
19-
using (new HighlightBox(Color.red))
20-
{
21-
EditorGUILayout.Slider("Range property", 5, 0, 10);
22-
EditorGUILayout.TextField("Sample Field", GUILayout.Height(150));
23-
EditorGUILayout.ObjectField("Object Field", null, typeof(Transform), true);
24-
}
25-
```
26-
27-
### EditorBlock
28-
A wrapper for vertical and horizontal oriented blocks that also accepts and additional style.
29-
30-
![Imgur](http://i.imgur.com/NhPueAu.png)
31-
32-
```csharp
33-
using (new EditorBlock(EditorBlock.Orientation.Vertical, "Box"))
34-
{
35-
EditorGUILayout.Slider("Range property", 5, 0, 10);
36-
EditorGUILayout.TextField("Sample Field", GUILayout.Height(150));
37-
EditorGUILayout.ObjectField("Object Field", null, typeof(Transform), true);
38-
}
39-
```
40-
41-
### SwitchColor
42-
A wrapper to change the GUIColor automatically without manually caching it and switching it back
43-
44-
![Imgur](http://i.imgur.com/VEBDzBi.png)
45-
46-
```csharp
47-
using (new SwitchColor(Color.cyan))
48-
{
49-
EditorGUILayout.Slider("Range property", 5, 0, 10);
50-
}
51-
52-
using (new SwitchColor(Color.green))
53-
{
54-
EditorGUILayout.TextField("Sample Field", GUILayout.Height(150));
55-
}
56-
57-
EditorGUILayout.ObjectField("Object Field", null, typeof(Transform), true);
58-
```
59-
60-
### IndentBlock
61-
A wrapper to indent controls
62-
63-
![Imgur](http://i.imgur.com/Zf17FFg.png)
64-
65-
```csharp
66-
using (new IndentBlock())
67-
{
68-
EditorGUILayout.Slider("Range property", 5, 0, 10);
69-
using (new IndentBlock())
70-
{
71-
EditorGUILayout.TextField("Sample Field", GUILayout.Height(150));
72-
EditorGUILayout.ObjectField("Object Field", null, typeof (Transform), true);
73-
}
74-
}
75-
```
76-
77-
### FoldableBlock
78-
A simple foldable block with a header. Can have an optional icon.
79-
80-
![Imgur](http://i.imgur.com/cyuogg2.png)
81-
82-
```csharp
83-
using (new FoldableBlock(ref state, "Foldable Block"))
84-
{
85-
if(state)
86-
{
87-
EditorGUILayout.Slider("Range property", 5, 0, 10);
88-
EditorGUILayout.TextField("Sample Field", GUILayout.Height(150));
89-
EditorGUILayout.ObjectField("Object Field", null, typeof (Transform), true);
90-
}
91-
}
92-
```
4+
More information can be found in the wiki including examples and screenshots: https://github.com/JefferiesTube/UnityEditorHelper/wiki

0 commit comments

Comments
 (0)