Odin Inspector 系列教程 --- Property

2021-11-26  本文已影响0人  忆中异

PropertyOrder特性:用于任何属性,并允许对属性进行排序。使用此选项可以定义属性的显示顺序。

image
完整示例代码
using Sirenix.OdinInspector;
using UnityEngine;

public class PropertyOrderExample : MonoBehaviour
{
    [PropertyOrder(1)]
    public int Second;

    [InfoBox("PropertyOrder用于更改inspector中属性的顺序")]
    [PropertyOrder(-1)]
    public int First;
}


更多教程内容详见:Unity 编辑器扩展工具 --- Odin Inspector 系列教程

链接:https://www.jianshu.com/p/ee86317bf6b6

上一篇 下一篇

猜你喜欢

热点阅读