Version: 2020.3

GUILayout.EndHorizontal

切换到手册
public static void EndHorizontal ();

描述

闭合以 BeginHorizontal 开始的组。

\ 水平布局。

using UnityEngine;

public class ExampleScript : MonoBehaviour { void OnGUI() { GUILayout.BeginHorizontal("box");

GUILayout.Button("I'm the first button"); GUILayout.Button("I'm to the right");

// End the horizontal group we began above GUILayout.EndHorizontal(); } }