Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

GUILayout.Width

マニュアルに切り替える
public static GUILayoutOption Width(float width);

パラメーター

説明

決められた幅をコントロールに与えるオプション


GUI コントロールの固定幅

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void OnGUI() { GUILayout.Button("A Button with fixed width", GUILayout.Width(300)); } }