Unity编辑器扩展(三)

自定义操作界面

Posted by MagicianJoker on January 7, 2021

界面的打开关闭

https://blog.csdn.net/q764424567/article/details/80908614

https://blog.csdn.net/qq_35361471/article/details/84713382

界面事件机制

(1)OnGUI()

(2)Update()

(3)OnInspectorUpdate()

(4)OnDestroy()

(5)OnFocus()

(6)OnLoseFocus()

(7)OnSelectionChange()

(8)OnHierarchyChange()

(9)OnProjectChgange

文本/颜色字段

(1)TextField

(2)TextArea

(3)PassworldFiled

(4)ColorFiled

标签字段

(1)PrefixLabel

(2)Space

(3)SelectableLabel

数字输入字段

(1)FloatFiled

(2)IntFiled

滑动条

(1)Slider

(2)IntSlider

(3)MinMaxSlider

位置/大小输入字段

(1)Vector2Filed

(2)Vector3Filed

(3)Vector4Filed

(4)RectFiled

(5)BoundsFiled

选择字段

(1)Popup

(2)EnumPopup

(3)IntPopup

标签/层/对象选择字段

(1)TagFiled

(2)LayerFiled

(3)ObjectFiled

单选字段

(1)Toggle

(2)Foldout

字段分组

(1)ToggleGroup

(2)Horizontal

(3)Vertical

(4)ScrollView

其它字段

(1)CurveFiled

(2)InspectorTitlebar

(3)Header

(4)Tooltip