📂 Unity 开发技能 | 目录索引
📂 Unity 常用插件 | 总目录
📂 Unity 开发资源 | 目录索引
📂 Unity 源码工程 | 总目录
Odin Attributes 为Unity开发者提供了更多的自定义选项,使得开发过程更加高效和愉悦。通过使用这些特性,开发者可以创建更加专业和用户友好的编辑器界面,从而提升整个开发团队的工作效率。

Enum Paging 特性:在 Inspector 中绘制一个带有 next 和 previous 按钮的枚举选择器,以便您循环浏览 enum 属性的可用值。

using Sirenix.OdinInspector;
using UnityEngine;
public class EnumPagingAttributeExample : MonoBehaviour
{
[EnumPaging]
public SomeEnum SomeEnumField;
public enum SomeEnum
{
A, B, C
}
[ShowInInspector]
[EnumPaging, OnValueChanged("SetCurrentTool")]
[InfoBox("Changing this property will change the current selected tool in the Unity editor.")]
private UnityEditor.Tool sceneTool;
private void SetCurrentTool()
{
UnityEditor.Tools.current = this.sceneTool;
}
}
🍉🍉🍉 如果觉得这篇文对你有帮助的话,请点个赞👍、收藏⭐️下吧,非常感谢! 💕💕💕
🥷🏻博主简介:20年软件开发经验,经历嵌入式驱动开发、Android开发、Unity游戏开发。积累收藏了大量游戏开发资源和素材,如有需要请联系我。
互3互推也请联系我…


2万+

被折叠的 条评论
为什么被折叠?



