using UnityEngine; using System.Collections; using MoreMountains.Tools; using UnityEditor; namespace MoreMountains.Tools { /// /// An editor class used to display menu items /// public class MMDebugEditor { /// /// Adds a menu item to enable debug logs /// [MenuItem("Tools/More Mountains/Enable Debug Logs", false, 100)] private static void EnableDebugLogs() { MMDebug.SetDebugLogsEnabled(true); } /// /// Conditional method to determine if the "enable debug log" entry should be greyed or not /// [MenuItem("Tools/More Mountains/Enable Debug Logs", true)] private static bool EnableDebugLogsValidation() { return !MMDebug.DebugLogsEnabled; } /// /// Adds a menu item to disable debug logs /// [MenuItem("Tools/More Mountains/Disable Debug Logs", false, 101)] private static void DisableDebugLogs() { MMDebug.SetDebugLogsEnabled(false); } /// /// Conditional method to determine if the "disable debug log" entry should be greyed or not /// [MenuItem("Tools/More Mountains/Disable Debug Logs", true)] private static bool DisableDebugLogsValidation() { return MMDebug.DebugLogsEnabled; } /// /// Adds a menu item to enable debug logs /// [MenuItem("Tools/More Mountains/Enable Debug Draws", false, 102)] private static void EnableDebugDraws() { MMDebug.SetDebugDrawEnabled(true); } [MenuItem("Tools/More Mountains/Enable Debug Draws", true)] /// /// Conditional method to determine if the "enable debug log" entry should be greyed or not /// private static bool EnableDebugDrawsValidation() { return !MMDebug.DebugDrawEnabled; } [MenuItem("Tools/More Mountains/Disable Debug Draws", false, 103)] /// /// Adds a menu item to disable debug logs /// private static void DisableDebugDraws() { MMDebug.SetDebugDrawEnabled(false); } [MenuItem("Tools/More Mountains/Disable Debug Draws", true)] /// /// Conditional method to determine if the "disable debug log" entry should be greyed or not /// private static bool DisableDebugDrawsValidation() { return MMDebug.DebugDrawEnabled; } } }