美文网首页
Odin Inspector 系列教程 --- Hide Lab

Odin Inspector 系列教程 --- Hide Lab

作者: 忆中异 | 来源:发表于2021-11-25 15:13 被阅读0次

Hide Label Attribute特性:用于任何属性,并在Inspector中中隐藏标签。使用此选项可隐藏Inspector中的属性标签。
也就是把字段的名称隐藏,只留下value

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

public class HideLabelExample : MonoBehaviour
{
    public string showLabel = "菜鸟海澜";

    [HideLabel]
    public string hideLabel = "隐藏标题";

    [ShowInInspector]
    public string ShowPropertyLabel { get; set; }

    [HideLabel][ShowInInspector]
    public string HidePropertyLabel { get; set; }
}


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

链接:https://www.jianshu.com/p/07088269e7cc

相关文章

网友评论

      本文标题:Odin Inspector 系列教程 --- Hide Lab

      本文链接:https://www.haomeiwen.com/subject/bdqbtrtx.html