-
-
Save RimuruDev/987f97ae7a454cc2d2dd897849edfa66 to your computer and use it in GitHub Desktop.
Debug Log Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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