Skip to content

Instantly share code, notes, and snippets.

@RimuruDev
Created August 23, 2023 19:59
Show Gist options
  • Save RimuruDev/987f97ae7a454cc2d2dd897849edfa66 to your computer and use it in GitHub Desktop.
Save RimuruDev/987f97ae7a454cc2d2dd897849edfa66 to your computer and use it in GitHub Desktop.
Debug Log Helper
// ReSharper disable All
// **************************************************************** //
//
// Copyright (c) RimuruDev. All rights reserved.
// Contact me:
// - Gmail: rimuru.dev@gmail.com
// - GitHub: https://github.com/RimuruDev
// - LinkedIn: https://www.linkedin.com/in/rimuru/
//
// **************************************************************** //
using UnityEngine;
namespace RimuruDev.Internal.Codebase
{
public static class D
{
#if UNITY_EDITOR
public static bool IsEnableDebugLog = true;
#else
public static bool IsEnableDebugLog = false;
#endif
public static void Message(string meggage, UnityEngine.Object @object = null)
{
if (!IsEnableDebugLog)
return;
Debug.Log(meggage, @object);
}
public static void Warning(string meggage, UnityEngine.Object @object = null)
{
if (!IsEnableDebugLog)
return;
Debug.LogWarning(meggage, @object);
}
public static void Error(string meggage, UnityEngine.Object @object = null)
{
if (!IsEnableDebugLog)
return;
Debug.LogError(meggage, @object);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment