Version: 2017.3

GUIStyle.stretchHeight

切换到手册
public bool stretchHeight ;

描述

是否可以垂直拉伸该样式的 GUI 元素来改善布局效果?

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { GUI.skin.button.stretchHeight = true; } }