You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Feel/MMTools/Tools/MMUtilities/MMDebugController.cs

27 lines
864 B
C#

3 months ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MoreMountains.Tools
{
/// <summary>
/// Add this class to an empty object in your scene and it'll act as a point of control to enable or disable logs and debug draws
/// </summary>
[AddComponentMenu("More Mountains/Tools/Utilities/MMDebugController")]
public class MMDebugController : MonoBehaviour
{
/// whether or not debug logs (MMDebug.DebugLogTime, MMDebug.DebugOnScreen) should be displayed
public bool DebugLogsEnabled = true;
/// whether or not debug draws should be executed
public bool DebugDrawEnabled = true;
/// <summary>
/// On Awake we turn our static debug checks on or off
/// </summary>
protected virtual void Awake()
{
MMDebug.SetDebugLogsEnabled(DebugLogsEnabled);
MMDebug.SetDebugDrawEnabled(DebugDrawEnabled);
}
}
}