以下の表には、UnityEngine.UIElements
と UnityEditor.UIElements
名前空間で使用可能な UXML 要素がまとめられています。
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
VisualElement |
すべてのビジュアル要素の基本クラス | UnityEngine.UIElements |
任意の数の VisualElement
|
class : スペースで区切られた名前のリストstyle : 要素にスタイルを与えるための USS ディレクティブname : この要素のための固有の文字列識別子picking-mode : Position または Ignore に設定されます。既定値は Position です。tooltip : マウスでポインターを要素上に置くと、文字列が表示されます。focusable : 要素がフォーカス可能かどうかを示すブーリアンです。デフォルトは false (フォーカス不可) に設定されています。これは、廃止された focus-index 要素の代替です。tabindex : 要素のタブ位置とツリー内の位置を定義する整数です。正の値は、タブの優先度を上げます。デフォルトは 0 です。これは、廃止された focus-index 要素の代替です。view-data-key : 要素のシリアライズに使用されるキーを定義する文字列です。この要素は他の属性も受け入れます。 |
BindableElement |
SerializedProperty にバインドできる要素。プロパティの値と表示される値は同期されます。 |
UnityEngine.UIElements |
任意の数の VisualElement
|
binding-path : この要素がバインドされているプロパティーのパス |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
Box |
この要素は VisualElement に似ていますが、コンテンツの周りにボックスを描画します。 |
UnityEngine.UIElements |
任意の数の VisualElement
|
VisualElement のすべての属性 |
TextElement |
テキストを表示する要素 | UnityEngine.UIElements |
なし |
VisualElement のすべての属性 text : 要素が表示するテキスト |
Label |
テキストラベル | UnityEngine.UIElements |
なし |
TextElement のすべての属性 |
画像 |
画像を表示します。 | UnityEngine.UIElements |
なし |
VisualElement のすべての属性 |
IMGUIContainer |
IMGUI コンテンツを描画します。 | UnityEngine.UIElements |
なし |
VisualElement の属性focus-index のデフォルト値は 0 focusable のデフォルト値は true
|
Foldout |
コンテンツの表示/非表示を切り替えるボタンを持つ要素 | UnityEngine.UIElements |
任意の数の VisualElement
|
BindableElement のすべての属性 |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
テンプレート |
Instance 要素を使ってインスタンス化できる別の UXML テンプレートへの参照 |
UnityEngine.UIElements |
なし |
name : この要素の固有の文字列識別子path : ロードする UXML ファイルパス |
Instance |
Template のインスタンス |
UnityEngine.UIElements |
なし |
template : インスタンス化する Template の name
|
TemplateContainer |
テンプレートコンテナ | UnityEngine.UIElements |
なし |
BindableElement のすべての属性 template : このテンプレートの文字列識別子 |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
BaseField<T> |
すべてのフィールドの抽象基本クラスです。 | UnityEngine.UIElements |
なし |
BindableElement のすべての属性focus-index のデフォルト値は 0 focusable のデフォルト値は true label : フィールドに紐付けられたラベルのテキスト |
BaseFieldTraits<ValueType, UxmlType> |
UnityEngine.UIElements |
なし |
BaseField<ValueType> のすべての属性value : ValueType 型のフィールドの基本値 |
|
Button |
標準のプッシュボタン | UnityEngine.UIElements |
なし |
TextElement のすべての属性 |
RepeatButton |
押下中にアクションを繰り返し実行するボタン | UnityEngine.UIElements |
なし |
TextElement のすべての属性delay : 要素がアクションを実行するまでの最初の遅延 (ミリ秒)。デフォルト値は 0 interval : 各アクションを繰り返す間隔 (ミリ秒)。 デフォルト値は0
|
Toggle |
トグルボタン (チェックボックス) | UnityEngine.UIElements |
なし |
BaseFieldTraits <bool, UxmlBoolAttributeDescription> text : トグルの右側のラベル |
Scroller |
スクロールバー | UnityEngine.UIElements |
なし |
VisualElement のすべての属性 low-value : スクロールバーの最小値high-value : スクロールバーの最大値direction : Horizontal または Vertical に設定。デフォルトは Vertical value : スクロールバーのカーソル位置 |
Slider |
スライダー | UnityEngine.UIElements |
なし |
BaseFieldTraits<float, UxmlFloatAttributeDescription> のすべての属性 low-value : スライダーの最小値high-value : スライダーの最大値direction : Horizontal または Vertical に設定</float,>。デフォルトは Horizontal page-size : スライダーのサイズ |
SliderInt |
整数値のスライダー | UnityEngine.UIElements |
なし |
BaseFieldTraits<int, UxmlIntAttributeDescription> のすべての属性 low-value : スライダーの最小値high-value : スライダーの最大値direction : Horizontal または Vertical に設定。デフォルトは Horizontal 。page-size : スライダーのサイズ |
MinMaxSlider |
ユーザーが最小値と最大値を指定できるスライダー | UnityEngine.UIElements |
なし |
BaseField<Vector2> のすべての属性low-limit : スライダーの最小値high-limit : スライダーの最大値min-value : スライダーカーソルの最小値max-value : スライダーカーソルの最大値 |
EnumField |
フィールドは基本の Enum の文字列の値のみ入力可能です。 |
UnityEditor.UIElements |
なし |
BaseField<Enum> のすべての属性type : 基礎となる Enum の C# 型を表す文字列。型がユーザーアセンブリ内にある場合は、型名にアセンブリ名を追加する必要があります: MyNamespace.MyEnum, MyAssembly 。type 文字列は必ず必要です。value : フィールドの値を表す文字列 |
MaskField |
ユーザーが値のグループを選択できるポップアップメニュー。 | UnityEditor.UIElements |
なし |
BaseField<int> のすべての属性choices : ポップアップメニューに表示する最大 32 個のオプションをカンマで区切ったリストvalue : フィールドの値を 32 ビットのマスクで表した整数 |
LayerField |
ユーザーが レイヤー を選択できるポップアップメニュー。 | UnityEditor.UIElements |
なし |
BaseField<int> のすべての属性value : フィールドの値 (選択されたレイヤー番号) を表す整数 |
LayerMaskField |
ユーザーが レイヤ のグループを選択できるポップアップメニュー | UnityEditor.UIElements |
なし |
MaskField のすべての属性 |
TagField |
ユーザーが タグ を選択できるポップアップメニュー | UnityEditor.UIElements |
なし |
BaseField<string> のすべての属性value : フィールド (選択されたタグ名) の値を表す文字列 |
ProgressBar |
操作の進行状況を示すプログレスバー | UnityEditor.UIElements |
なし |
BindableElement のすべての属性low-value : プログレスバーの最小値を表す float値。デフォルトは 0high-value : プログレスバーの最高値を表す float。デフォルトは 100title : プログレスバーのタイトルを表す文字列 |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
TextInputBaseField<TValueType> |
すべてのテキストフィールドの抽象基本クラス | UnityEngine.UIElements |
なし |
BaseFieldTraits<string, UxmlStringAttributeDescription> のすべての属性text : フィールドのテキスト値max-length : フィールドに入力できる最大文字数。デフォルト値 -1 はテキストの長さを制限しません。password : maskCharacter 文字を使用してフィールドの内容を表示するかを示すブーリアン値。false がデフォルト設定です。mask-character : password が true のときに、フィールドのコンテンツを表示する文字です。デフォルトは文字 * readonly : フィールドが読み取り専用であることを示すブーリアン値です。既定値は false
|
TextField |
編集可能なテキストフィールド | UnityEngine.UIElements |
なし |
TextInputBaseField <string> のすべての属性multiline : テキストフィールドがそのテキストを複数行に表示するかを示すブーリアン値。true に設定すると、複数行に表示します。false に設定すると、テキストの改行を無視して表示、または 1 行に表示します。false がデフォルトです。 |
IntegerField |
int (32ビット) 値を入力できるテキストフィールド | UnityEditor.UIElements |
なし |
BaseFieldTraits<int, UxmlIntAttributeDescription> のすべての属性 |
LongField |
Long (64ビット) の値を入力できるテキストフィールド | UnityEditor.UIElements |
なし |
BaseFieldTraits<long, UxmlLongAttributeDescription> のすべての属性 |
FloatField |
単精度浮動小数点値を入力できるテキストフィールド | UnityEditor.UIElements |
なし |
BaseFieldTraits<float, UxmlFloatAttributeDescription> のすべての属性 |
DoubleField |
倍精度浮動小数点値を入力できるテキストフィールド | UnityEditor.UIElements |
なし |
BaseFieldTraits<double, UxmlDoubleAttributeDescription> のすべての属性 |
Vector2Field |
Vector2 の値を編集するための float 値を入力できる 2 つのテキストフィールド |
UnityEditor.UIElements |
なし |
BaseField<Vector2> のすべての属性 x : X 座標の値y : Y 座標の値 |
Vector2IntField |
Vector2Int の値を編集するための int 値を入力できる 2 つのテキストフィールド |
UnityEditor.UIElements |
なし |
BaseField<Vector2Int> のすべての属性x : X 座標の値y : Y 座標の値 |
Vector3Field |
Vector3 の値を編集するための float 値を設定する 3 つのテキストフィールド |
UnityEditor.UIElements |
なし |
BaseField<Vector3> のすべての属性x : X 座標の値y : Y 座標の値z : Z 座標の値 |
Vector3IntField |
Vector3Int の値を編集するための int 値を入力できる 3 つのテキストフィールド |
UnityEditor.UIElements |
なし |
BaseField<Vector3Int> のすべての属性x : X 座標の値y : Y 座標の値z : Z 座標の値 |
Vector4Field |
Vector4 の値を編集するための float 値を入力できる 4 つのテキストフィールド |
UnityEditor.UIElements |
なし |
BaseField<Vector4> のすべての属性x : X 座標の値y : Y 座標の値z : Z 座標の値w : W 座標の値 |
RectField |
矩形の値を編集するための float 値を入力できる 4 つのテキストフィールド | UnityEditor.UIElements |
なし |
BaseField<Rect> のすべての属性x : X 座標の左上の角の値y : Y 座標の左上の角の値w : 矩形の幅h : 矩形の高さ |
RectIntField |
矩形の値を編集するための int 値を入力できる 4 つのテキストフィールド | UnityEditor.UIElements |
なし |
BaseField<RectInt> のすべての属性x : X 座標の左上の角の値y : Y 座標の左上の角の値w : 矩形の幅h : 矩形の高さ |
BoundsField |
バウンディング矩形の値を編集するための float 値を入力できる 6 つのテキストフィールド | UnityEditor.UIElements |
なし |
BaseField<Bounds> のすべての属性cx : X 座標の中心の値cy : Y 座標の中心の値cz : Z 座標の中心の値ex : X 座標のエクステントey : Y 座標のエクステントez : Z 座標のエクステント |
BoundsIntField |
バウンディング矩形の値を編集するための int 値を入力できる 6 つのテキストフィールド | UnityEditor.UIElements |
なし |
BaseField<BoundsInt> のすべての属性px : X 座標位置の値py : Y 座標位置の値pz : Z 座標位置の値sx : X 座標サイズの値sy : Y 座標サイズの値sz : Z 座標サイズの値 |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
PropertyField |
値を編集するラベルとフィールド | UnityEditor.UIElements |
なし |
VisualElement のすべての属性binding-path : この要素がバインドされているプロパティのパスlabel : フィールドのラベル |
PropertyControl<int> |
int 型の値を編集するためのラベルとフィールド |
UnityEditor.UIElements |
なし |
BaseField<int> のすべての属性value-type : 値の型を表す文字列value : フィールドの値 |
PropertyControl<long> |
long 型の値を編集するためのラベルとフィールド |
UnityEditor.UIElements |
なし |
BaseField<long> のすべての属性value-type : 値の型を表す文字列value : フィールドの値 |
PropertyControl<float> |
float 型の値を編集するためのラベルとフィールド |
UnityEditor.UIElements |
なし |
BaseField<float> のすべての属性value-type : 値の型を表す文字列value : フィールドの値 |
PropertyControl<double> |
double 型の値を編集するためのラベルとフィールド |
UnityEditor.UIElements |
なし |
BaseField<double> のすべての属性value-type : 値の型を表す文字列value : フィールドの値 |
PropertyControl<string> |
string 型の値を編集するためのラベルとフィールド |
UnityEditor.UIElements |
なし |
BaseField<string> のすべての属性value-type : 値の型を表す文字列value : フィールドの値 |
ColorField |
カラーピッカーフィールド | UnityEditor.UIElements |
なし |
BaseFieldTraits<Color, UxmlColorAttributeDescription> のすべての属性 show-eye-dropper : スポイトを表示するかどうかを示すブーリアンです。true に設定するとスポイトが表示され、false に設定するとスポイトが非表示になります。デフォルトでは、これは true に設定されています。show-alpha : アルファコントロールを表示するかどうかを示すブーリアンです。true に設定するとコントロールが表示され、false に設定すると非表示になります。デフォルトでは、これは true に設定されています。hdr : ハイダイナミックレンジ (HDR) カラーピッカーを使用するかどうかを示すブーリアンです。true に設定すると、HDR ピッカーを使用します。デフォルトでは、これは false に設定されています。 |
CurveField |
カーブエディターフィールド | UnityEditor.UIElements |
なし |
BaseField<AnimationCurve> のすべての属性 |
GradientField |
グラデーションエディターフィールド | UnityEditor.UIElements |
なし |
BaseField<Gradient> のすべての属性 |
ObjectField |
オブジェクト選択フィールド | UnityEditor.UIElements |
なし |
BaseField<Object> のすべての属性 allow-scene-objects : シーンのオブジェクトを選択できるかどうかを示すブーリアンです。true に設定するとオブジェクトの選択が可能になり、 false に設定すると選択ができなくなります。デフォルトでは、これは true に設定されています。 |
InspectorElement |
インスペクターウィンドウでプロパティを表示する要素 | UnityEditor.UIElements |
任意の数の VisualElement
|
BindableElement のすべての属性 |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
Toolbar |
ツールバーアイテムを保持するためのコンテナ | UnityEditor.UIElements |
すべての VisualElement
|
VisualElement のすべての属性 |
ToolbarButton |
ツールバーのボタン | UnityEditor.UIElements |
なし |
Button のすべての属性 |
ToolbarToggle |
ツールバーのトグル | UnityEditor.UIElements |
なし |
Toggle のすべての属性 |
ToolbarMenu |
ツールバーのドロップダウンメニュー。メニューには下向きの矢印が 1 つあります。 | UnityEditor.UIElements |
なし |
TextElement のすべての属性 |
ToolbarSearchField |
ツールバーの検索フィールド | UnityEditor.UIElements |
なし |
VisualElement のすべての属性 |
ToolbarPopupSearchField |
検索オプションのポップアップメニューが備わった検索フィールド | UnityEditor.UIElements |
なし |
VisualElement のすべての属性 |
ToolbarSpacer |
ツールバーのボタンの間に固定された量の空白を挿入する要素 | UnityEditor.UIElements |
なし |
VisualElement のすべての属性 |
要素 | 機能 | 名前空間 | 許可された子要素 | 属性 |
---|---|---|---|---|
ListView |
要素のリストを表示します。 | UnityEngine.UIElements |
なし |
VisualElement のすべての属性 item-height : リストの各項目の高さ (単位はピクセル) |
ScrollView |
水平スクロールバーと垂直スクロールバーを持つスクロール可能なビュー | UnityEngine.UIElements |
任意の数の VisualElement
|
VisualElement のすべての属性mode : スクロールビューのモード。デフォルトでは、これは ScrollViewMode.Vertical に設定されていますshow-horizontal-scroller : 水平スクロールバーを表示するかどうかを示すブーリアンです。デフォルトでは、これは false に設定されています<br/> show-vertical-scroller: 水平スクロールバーを表示するかどうかを示すブーリアンです。デフォルトでは、これは falseに設定されています horizontal-page-size : 水平スクロールバーのサイズ |
TreeView |
ツリー階層の要素を表示するビュー | UnityEngine.UIElements |
任意の数の VisualElement
|
VisualElement のすべての属性item-height : 表示される基本的なリストの項目の高さ |
PopupWindow |
他のコンテンツに重ねて表示される UIElement ウィンドウ | UnityEditor.UIElements |
なし |
TextElement のすべての属性 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.