GUILayout

舊的 UI 系統工具,現在用於遊戲中的快速簡單的原型設計或除錯。

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 函式在 OnGUI 函式內部工作。