Custom component Inspectors
using SuperScenes.Editor.CustomEditors;
using UnityEditor;
using UnityEngine.UIElements;
namespace SuperScenes.Editor
{
[CustomPropertyDrawer(typeof(EnemyData))]
public class EnemyDataPropertyDrawer : SceneComponentDrawer
{
protected override VisualElement DrawComponent(SerializedProperty property)
{
VisualElement inspector = base.DrawComponent(property);
inspector.Add(new HelpBox("This box has been added by a custom PropertyDrawer.",
HelpBoxMessageType.Info));
return inspector;
}
}
}Last updated