CustomPropertyDrawer

class in UnityEditor

切换到手册

描述

告知自定义 PropertyDrawerDecoratorDrawer 该绘制器所针对的运行时 Serializable 类或 PropertyAttribute

当您构建自定义 PropertyDrawerDecoratorDrawer 时,您需要将此属性添加到绘制器类上。 如果绘制器针对的是 Serializable 类,那么请将此类的类型传递到 CustomPropertyDrawer 属性(只对 PropertyDrawer 有效;对 DecoratorDrawer 无效)。 如果绘制器针对的是 PropertyAttribute,那么请将 PropertyAttribute 的类型传递给 CustomPropertyDrawer 属性。

另请参阅:PropertyDrawer 类、DecoratorDrawer 类。

构造函数

CustomPropertyDrawer告知 PropertyDrawer 或 DecoratorDrawer 类该绘制器所针对的运行时类或属性。