Show In Inline Editors Attribute:用于在Inline中顯示對(duì)應(yīng)的屬性
using Sirenix.OdinInspector;
using UnityEngine;
public class ShowInInlineEditorsAttributeExample : MonoBehaviour
{
[InfoBox("單擊屬性值打開(kāi)一個(gè)新的檢查窗口,也可以看到這些屬性的不同.")]
[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]//顯示但是是灰態(tài)
public string DisabledInInlineEditor;
}