Attribute拓展

本框架对Odin Inspector的Attribute也进行了拓展。

下面是常用的拓展:

IsNotNullOrEmpty

用来标记某一字段或者属性不能是Null或者为空,适用于string、List<>、Array等等集合或者任意class类型。

用法:

[IsNotNullOrEmpty]
public string name;

[IsNotNullOrEmpty]
public List<Config> configs = new();

Editor效果:

最后更新于

这有帮助吗?