obsidian/笔记文件/2.笔记/odin入门和进阶_第一章.md
2025-03-26 00:02:56 +08:00

217 lines
4.8 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

脚本汇总,所在预制体
![[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可以设置自动填充列表
还可以通过LayerTag命名关键字筛选等
也可以通过函数筛选例如是否包含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]]
只显示文本内容DisplayAsStringoverflow为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]]