Experimental: this API is experimental and might be changed or removed in the future.

UIElementsPropertyDrawer

class in UnityEditor.Experimental

/

继承自:PropertyDrawer

切换到手册

描述

用于派生自定义属性绘制器的基类。使用此基类可为您自己的 Serializable 类或者为具有自定义 PropertyAttributes 的脚本变量创建自定义 UIElements 绘制器。

公共函数

CreatePropertyGUI使用您自己的字段覆盖默认的 UIElements 属性字段 VisualElement。

继承的成员

变量

attribute此属性的 PropertyAttribute。不适用于自定义类绘制器。(只读)
fieldInfo此属性所表示的成员的反射 FieldInfo。(只读)

公共函数

CanCacheInspectorGUI重载此方法可确定您的属性的检视面板 GUI 是否可以缓存。
GetPropertyHeight重载此方法可指定此字段的 GUI 的高度(以像素为单位)。
OnGUI重写此方法,以针对该属性创建您自己的 GUI。

Did you find this page useful? Please give it a rating: