debug
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
public static class ComponentDebugMenu
|
||||
{
|
||||
[MenuItem("CONTEXT/MonoBehaviour/Enable Debug")]
|
||||
static void EnableDebug(MenuCommand command)
|
||||
{
|
||||
var comp = command.context as MonoBehaviour;
|
||||
DebugRegistry.Enable(comp);
|
||||
Debug.Log($"Debug enabled: {comp.name} ({comp.GetType().Name})");
|
||||
}
|
||||
|
||||
[MenuItem("CONTEXT/MonoBehaviour/Disable Debug")]
|
||||
static void DisableDebug(MenuCommand command)
|
||||
{
|
||||
var comp = command.context as MonoBehaviour;
|
||||
DebugRegistry.Disable(comp);
|
||||
Debug.Log($"Debug disabled: {comp.name} ({comp.GetType().Name})");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user