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(); } } }