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

スクリプト言語

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

EditorGUILayout.ToggleLeft

マニュアルに切り替える
public static bool ToggleLeft(string label, bool value, params GUILayoutOption[] options);
public static bool ToggleLeft(GUIContent label, bool value, params GUILayoutOption[] options);
public static bool ToggleLeft(string label, bool value, GUIStyle labelStyle, params GUILayoutOption[] options);
public static bool ToggleLeft(GUIContent label, bool value, GUIStyle labelStyle, params GUILayoutOption[] options);

パラメーター

label トグルの隣に表示するラベル
value 編集する値
labelStyle 表示位置
options 特別なレイアウト対応をするためのレイアウトオプションリスト。ここに渡された値は style で定義された設定を上書きします。
See Also: GUILayout.Width, GUILayout.Height, GUILayout.MinWidth, GUILayout.MaxWidth, GUILayout.MinHeight, GUILayout.MaxHeight, GUILayout.ExpandWidth, GUILayout.ExpandHeight.

説明

トグルが左側にあり、そのすぐ右側にラベルがある Toggle Field を作成します。

EditorGUILayout.ToggleLeftGUILayout.Toggle に似ていますが、 EditorGUI.showMixedValue プロパティーを尊重し、キーボードフォーカスを他の Editor Control と一貫するように処理します。