Immediate Mode Graphical User Interface System (IMGUI)

Other topics

GUILayout

Old UI system tool, now used for fast and simple prototyping or debugging in game.

void OnGUI ()
{
    GUILayout.Label ("I'm a simple label text displayed in game.");

    if ( GUILayout.Button("CLICK ME") )
    {
        GUILayout.TextArea ("This is a \n
                             multiline comment.")
    }
}

GUILayout function works inside the OnGUI function.

Syntax:

  • public static void GUILayout.Label(string text, params GUILayoutOption[] options)
  • public static bool GUILayout.Button(string text, params GUILayoutOption[] options)
  • public static string GUILayout.TextArea(string text, params GUILayoutOption[] options)

Contributors

Topic Id: 6947

Example Ids: 23466

This site is not affiliated with any of the contributors.