UnityのUIElementsで使えるUI要素を一覧化しました。
Unity2019.3.0
UIElements?
UIElementsはUnity2019から導入されたUIを構築する仕組みです。
詳しくは以下にまとめていますので必要に応じて参照してください。
本記事ではこのUIElementsで使えるUI要素のクラスを画像付きでまとめました。
執筆時点ではTreeViewなどの複雑なクラスはまだ実装されていないので、
掲載されていないものなどお気づきの点がありましたら随時ご連絡いただけますと幸いです。
基本的なUI
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
Label | ![]() |
UnityEngine.UIElements | |
Image | ![]() |
UnityEngine.UIElements | 画像表示 |
FoldOut | ![]() |
UnityEngine.UIElements | 折り畳み表示用のUI |
Button | ![]() |
UnityEngine.UIElements | |
Toggle | ![]() |
UnityEngine.UIElements |
ユーザ入力
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
TextField | ![]() |
UnityEngine.UIElements | |
IntegerField | ![]() |
UnityEditor.UIElements | |
LongField | ![]() |
UnityEditor.UIElements | |
FloatField | ![]() |
UnityEditor.UIElements | |
DoubleField | ![]() |
UnityEditor.UIElements | |
Vector2Field | ![]() |
UnityEditor.UIElements | |
Vector2IntField | ![]() |
UnityEditor.UIElements | |
Vector3Field | ![]() |
UnityEditor.UIElements | |
Vector3IntField | ![]() |
UnityEditor.UIElements | |
Vector4Field | ![]() |
UnityEditor.UIElements | |
Vector4IntField | ![]() |
UnityEditor.UIElements | |
RectField | ![]() |
UnityEditor.UIElements | |
RectIntField | ![]() |
UnityEditor.UIElements | |
BoundsField | ![]() |
UnityEditor.UIElements | |
BoundsIntField | ![]() |
UnityEditor.UIElements | |
ColorField | ![]() |
UnityEditor.UIElements | |
CurveField | ![]() |
UnityEditor.UIElements | |
GradientField | ![]() |
UnityEditor.UIElements |
選択
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
EnumField | ![]() |
UnityEditor.UIElements | |
MaskField | ![]() |
UnityEditor.UIElements | |
LayerField | ![]() |
UnityEditor.UIElements | レイヤー選択用のUI |
LayerMaskField | ![]() |
UnityEditor.UIElements | レイヤー複数選択用のUI |
TagField | ![]() |
UnityEditor.UIElements | タグ選択用のUI |
一覧表示
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
VisualElement | ![]() |
UnityEngine.UIElements | UI要素の基底クラスだがこれをコンテナにすることでリスト表示が可能になる。 さらにStyleを設定すればグリッド表示も。 |
ScrollView | ![]() |
UnityEngine.UIElements |
スライダー
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
Slider | ![]() |
UnityEngine.UIElements | |
SliderInt | ![]() |
UnityEngine.UIElements | |
MinMaxSlider | ![]() |
UnityEngine.UIElements |
レイアウト
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
Scroller | ![]() |
UnityEngine.UIElements | |
IMGUIContainer | (省略) | UnityEngine.UIElements | UIElements内でIMGUIを使ためのUInew IMGUIContainer(() => GUILayout.Button("")); のように使う |
Box | ![]() |
UnityEngine.UIElements | 他のUI要素を囲むためのUI |
ツールバー
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
Toolbar | ![]() |
UnityEditor.UIElements | ツールバーのコンテナ ツールバーのUIはこれにAddして使う |
ToolbarButton | ![]() |
UnityEditor.UIElements | |
ToolbarToggle | ![]() |
UnityEditor.UIElements | |
ToolbarMenu | ![]() |
UnityEditor.UIElements | |
ToolbarSearchField | ![]() |
UnityEditor.UIElements | |
ToolbarPopupSearchField | ![]() |
UnityEditor.UIElements | Hierarchyで使われているようなポップアップ付き検索フィールド |
ToolbarSpacer | (省略) | UnityEditor.UIElements | ツールバーの要素の間のスペース用 |
その他
クラス名 | 描画例 | 名前空間 | 備考 |
---|---|---|---|
PropertyField | ![]() |
UnityEditor.UIElements | VisualElement.Bind() をする必要あり |
ObjectField | ![]() |
UnityEditor.UIElements | objectTypeに型を指定する |
InspectorElement | ![]() |
UnityEditor.UIElements | 指定したオブジェクトのInspectorを描画する |
ProgressBar | ![]() |
UnityEditor.UIElements |