ImageHeader(path)

ImageHeader public class ImageHeaderAttribute : Attribute { public string AssetPath { get; private set; } public ImageHeaderAttribute(string assetPath) { this.AssetPath = assetPath; } } [OdinDrawer] [DrawerPriority(0.2, 0, 0)] public class ImageHeaderAttributeDrawer : OdinAttributeDrawer { protected override void DrawPropertyLayout(InspectorProperty property, ImageHeaderAttribute attribute, GUIContent label) { PropertyContext texture; if (property.Context.Get(this, "texture", out texture)) { texture.Value = AssetDatabase.LoadAssetAtPath(attribute.AssetPath); } GUILayout.Label(texture.Value, EditorStyles.centeredGreyMiniLabel); this.CallNextDrawer(property, label); } }