Created
August 8, 2015 18:54
-
-
Save greggman/9996532dc7a9ac442298 to your computer and use it in GitHub Desktop.
Example of Unity GUI vs IMGUI
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
// IMGUI | |
ImGui::Text("Hello, world %d", 123); | |
if (ImGui::Button("OK")) | |
{ | |
// do stuff | |
} | |
ImGui::InputText("string", buf, 256); | |
ImGui::SliderFloat("float", &f, 0.0f, 1.0f); | |
// Unity | |
GUILayout.Label("Hello, world " + 123); | |
if (GUILayout.Button("OK")) | |
{ | |
// do stuff | |
} | |
str = GUILayout.TextField("string", str); | |
GUILayout.Label("float"); | |
f = GUILayout.HorizontalSlider(f, 0.0f, 1.0f); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment