本文主要是介绍Odin Inspector 系列教程 --- Show In Inline Editors Attribute,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Show In Inline Editors Attribute:用于在Inline中显示对应的属性
using Sirenix.OdinInspector;
using UnityEngine;public class ShowInInlineEditorsAttributeExample : MonoBehaviour
{[InfoBox("单击属性值打开一个新的检查窗口,也可以看到这些属性的不同.")][InlineEditor(Expanded = true)]public MyInlineScriptableObject InlineObject;
}[CreateAssetMenu(fileName = "MyInline_ScriptableObject", menuName = "CreatScriptableObject/MyInlineScriptableObject")]
public class MyInlineScriptableObject : ScriptableObject
{[ShowInInlineEditors]public string ShownInInlineEditor;[HideInInlineEditors]//在绘制的里面不显示public string HiddenInInlineEditor;[DisableInInlineEditors]//显示但是是灰态public string DisabledInInlineEditor;
}
更多教程内容详见:革命性Unity 编辑器扩展工具 --- Odin Inspector 系列教程
这篇关于Odin Inspector 系列教程 --- Show In Inline Editors Attribute的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!