Created
January 21, 2019 00:32
-
-
Save MartinGonzalez/dfc589d3404a48a23ecf6cbb390bc452 to your computer and use it in GitHub Desktop.
ExampleEditorWindowV2.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void OnGUI() { | |
// Everything inside BeginHorizontal and EndHorizontal will be distributed horizontally | |
GUILayout.BeginHorizontal(); | |
GUILayout.Label("Hello"); | |
GUILayout.TextField("World!"); | |
GUILayout.EndHorizontal(); | |
GUILayout.BeginHorizontal(); | |
GUILayout.BeginVertical(); | |
GUILayout.Label("Bool Value"); | |
_toggle = GUILayout.Toggle(_toggle, ""); | |
GUILayout.EndVertical(); | |
GUILayout.BeginVertical(); | |
GUILayout.Label("String Value"); | |
_string = GUILayout.TextField(_string); | |
GUILayout.EndVertical(); | |
GUILayout.EndHorizontal(); | |
GUILayout.Label("Another label here"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment