Files
test/Assets/Editor/DebuggableInspector.cs
2026-05-27 17:48:15 +07:00

24 lines
617 B
C#

using UnityEditor;
using UnityEngine;
namespace BrewMonster
{
[CustomEditor(typeof(MonoBehaviour), true)]
public class DebuggableInspector : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
var targetMb = target as MonoBehaviour;
if (targetMb != null && DebugRegistry.IsEnabled(targetMb))
{
GUI.backgroundColor = Color.yellow;
EditorGUILayout.HelpBox("DEBUG ENABLED", MessageType.Info);
GUI.backgroundColor = Color.white;
}
DrawDefaultInspector();
}
}
}