unity3d Immediate Mode Graphical User Interface System (IMGUI) GUILayout


Example

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.