217 lines
4.8 KiB
Markdown
217 lines
4.8 KiB
Markdown
脚本汇总,所在预制体
|
||
|
||
![[Pasted image 20240312143231.png]]
|
||
|
||
是否只为预制体,只为场景物体
|
||
|
||
![[Pasted image 20240312143253.png]]
|
||
|
||
表现
|
||
|
||
![[Pasted image 20240312143332.png]]
|
||
|
||
筛选时候,可选项,起作用
|
||
|
||
![[Pasted image 20240312143357.png]]
|
||
|
||
对应绘制区域
|
||
|
||
![[Pasted image 20240312143507.png]]
|
||
|
||
也可以交互作用
|
||
|
||
![[Pasted image 20240312143602.png]]
|
||
|
||
![[Pasted image 20240312143616.png]]
|
||
|
||
延迟序列化;
|
||
如果不加Delayed或者DelayedProperty标签,就会实时修改,序列化;
|
||
加了,修改完成后,点击回车,或者松开鼠标,才会修改,序列化
|
||
|
||
![[Pasted image 20240312143736.png]]
|
||
|
||
表现,时机不同
|
||
|
||
![[Pasted image 20240312143840.png]]
|
||
|
||
各种提示文本,也可以设定,提示类型InfoMessageType,还有对应交互,点击details
|
||
|
||
![[Pasted image 20240312143923.png]]
|
||
|
||
![[Pasted image 20240312144018.png]]
|
||
|
||
是否可修改
|
||
|
||
![[Pasted image 20240312144046.png]]
|
||
|
||
![[Pasted image 20240312144057.png]]
|
||
|
||
设置控件颜色
|
||
|
||
![[Pasted image 20240312144125.png]]
|
||
|
||
颜色变化加入逻辑,调用编辑器时间,cos余弦变化,运算符添加逻辑语句,也是同理
|
||
|
||
![[Pasted image 20240312144146.png]]
|
||
|
||
![[Pasted image 20240312144330.png]]
|
||
|
||
隐藏控件标题,HideLabel标签
|
||
|
||
![[Pasted image 20240312144358.png]]
|
||
|
||
![[Pasted image 20240312144413.png]]
|
||
|
||
设置控件顺序,PropertyOrder设置序号
|
||
|
||
![[Pasted image 20240312144500.png]]
|
||
|
||
![[Pasted image 20240312144535.png]]
|
||
|
||
设置控件,显示上下间距
|
||
|
||
![[Pasted image 20240312144603.png]]
|
||
|
||
![[Pasted image 20240312144618.png]]
|
||
|
||
只读标签ReadOnly
|
||
|
||
![[Pasted image 20240312144646.png]]
|
||
|
||
![[Pasted image 20240312144659.png]]
|
||
|
||
错误信息自定义标签Required
|
||
|
||
![[Pasted image 20240312144851.png]]
|
||
|
||
![[Pasted image 20240312144910.png]]
|
||
|
||
属性面板显示标签ShowInInspector;
|
||
序列化保存标签SerializeField
|
||
|
||
![[Pasted image 20240312145035.png]]
|
||
|
||
![[Pasted image 20240312145109.png]]
|
||
|
||
各种标题样式,标签Title,所在位置,字体粗细
|
||
|
||
![[Pasted image 20240312145143.png]]
|
||
|
||
|
||
![[Pasted image 20240312145259.png]]
|
||
|
||
还可以显示时间
|
||
|
||
![[Pasted image 20240312145339.png]]
|
||
|
||
![[Pasted image 20240312145357.png]]
|
||
|
||
下拉菜单,可选项,自定义类型过滤TypeFilter;
|
||
获取类,配合反射处理
|
||
|
||
![[Pasted image 20240312145450.png]]
|
||
|
||
![[Pasted image 20240312145519.png]]
|
||
|
||
类的标题提示
|
||
|
||
![[Pasted image 20240312145634.png]]
|
||
|
||
![[Pasted image 20240312145730.png]]
|
||
|
||
调用的函数,也是资源检索即可
|
||
|
||
![[Pasted image 20240312145757.png]]
|
||
|
||
双击,也是正常跳转
|
||
|
||
![[Pasted image 20240312145826.png]]
|
||
|
||
![[Pasted image 20240312145845.png]]
|
||
|
||
对应配置文件,脚本逻辑
|
||
|
||
![[Pasted image 20240312145913.png]]
|
||
|
||
自定义验证器ValidateInput,例如预制体,判空逻辑;
|
||
可以设定,消息提示类型
|
||
|
||
![[Pasted image 20240312150029.png]]
|
||
|
||
![[Pasted image 20240312150131.png]]
|
||
|
||
各种自定义下拉菜单ValueDropdown,有List和数组,也有key和value成对的IEnumerable结构
|
||
|
||
![[Pasted image 20240312150203.png]]
|
||
|
||
![[Pasted image 20240312150424.png]]
|
||
|
||
还可以有树状结构,而且设置ExpandAllMenuItems,默认结构展开
|
||
|
||
![[Pasted image 20240312150508.png]]
|
||
|
||
![[Pasted image 20240312150535.png]]
|
||
|
||
资产列表;
|
||
可以过滤限制,列表可选路径;
|
||
AutoPopulate可以设置,自动填充列表;
|
||
还可以通过Layer,Tag,命名关键字筛选等;
|
||
也可以通过函数筛选,例如是否包含Rigidbody控件
|
||
|
||
![[Pasted image 20240312155246.png]]
|
||
|
||
![[Pasted image 20240312155609.png]]
|
||
|
||
资产选择器AssetSelector,主要是配合资产列表,添加特定的限制条件
|
||
|
||
![[Pasted image 20240312155802.png]]
|
||
|
||
![[Pasted image 20240312155943.png]]
|
||
|
||
显示子物体相关ChildGameObjectsOnly
|
||
|
||
![[Pasted image 20240312160137.png]]
|
||
|
||
![[Pasted image 20240312160152.png]]
|
||
|
||
调色板ColorPalette
|
||
|
||
![[Pasted image 20240312160226.png]]
|
||
|
||
可以调用编辑器自带调色板,也可以自定义调色板类ColorPalette
|
||
|
||
![[Pasted image 20240312160252.png]]
|
||
|
||
![[Pasted image 20240312160333.png]]
|
||
|
||
只显示文本内容DisplayAsString,overflow为false的时候,会自动换行
|
||
|
||
![[Pasted image 20240312160414.png]]
|
||
|
||
![[Pasted image 20240312160426.png]]
|
||
|
||
文件路径相关FilePath,添加路径限制,文件类型限制,例如cs和lua文件后缀,绝对路径显示设定等
|
||
|
||
![[Pasted image 20240312160535.png]]
|
||
|
||
其余扩展
|
||
|
||
![[Pasted image 20240312160633.png]]
|
||
|
||
![[Pasted image 20240312160652.png]]
|
||
|
||
文件夹路径相关FolderPath,相关逻辑,和文件路径FilePath标签,类似
|
||
|
||
![[Pasted image 20240312160805.png]]
|
||
|
||
![[Pasted image 20240312160835.png]]
|
||
|
||
这个配置文件相关逻辑,属性面板中,ShowInInlineEditors是显示,HideInInlineEditors是隐藏,DisableInInlineEditors是不可修改
|
||
|
||
![[Pasted image 20240312160911.png]]
|
||
|
||
调用脚本
|
||
|
||
![[Pasted image 20240312161005.png]]
|
||
|
||
![[Pasted image 20240312161021.png]] |