Odin Inspector 系列教程 --- Hide Lab

2021-11-25  本文已影响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

上一篇 下一篇

猜你喜欢

热点阅读