Created
February 2, 2016 20:58
-
-
Save maritaria/24471d30c5bff6990a44 to your computer and use it in GitHub Desktop.
Better logger for unity
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
using System.Diagnostics; | |
namespace HotBot.Core | |
{ | |
public static class _DeleteMe | |
{ | |
[Conditional("UNITY_EDITOR")]//Make sure its the correct one | |
public static void Log(string format, params object[] args) | |
{ | |
//Code that logs stuff | |
Debugger.Log(0, "Debug", string.Format(format, args)); | |
} | |
public static void Example_Before() | |
{ | |
#ifdef UNITY_EDITOR | |
Debugger.Log(0, "Debug", "Hello world!"); | |
#endif | |
} | |
public static void Example_After() | |
{ | |
_DeleteMe.Log("Hello {0}", "World"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment