Files
test/Assets/Editor/DebuggableInspector.cs
T
2025-12-23 14:19:04 +07:00

24 lines
605 B
C#

using UnityEditor;
using UnityEngine;
namespace BrewMonster
{
[CustomEditor(typeof(MonoBehaviour), true)]
public class DebuggableInspector : 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();
}
}
}