Created
December 4, 2018 20:11
-
-
Save Voresh/5ee00ca9dcd9848e5261650e8acbf74c to your computer and use it in GitHub Desktop.
Unity conditional debug
This file contains hidden or 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
| using System.Diagnostics; | |
| using Debug = UnityEngine.Debug; | |
| public static class ConditionalDebug | |
| { | |
| [Conditional("ENABLE_CONDITIONAL_DEBUG")] | |
| public static void Log(object message) | |
| { | |
| Debug.Log(message); | |
| } | |
| [Conditional("ENABLE_CONDITIONAL_DEBUG")] | |
| public static void LogError(object message) | |
| { | |
| Debug.LogError(message); | |
| } | |
| [Conditional("ENABLE_CONDITIONAL_DEBUG")] | |
| public static void LogWarning(object message) | |
| { | |
| Debug.LogWarning(message); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment