-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
393 additions
and
60 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
|
||
namespace BGICompiler.Compiler.Logger | ||
{ | ||
class Debug | ||
{ | ||
#if STANDALONE_SCRIPT_COMPILER | ||
public static void Log(object message) | ||
{ | ||
print($"INFO", message); | ||
} | ||
|
||
public static void LogWarning(object message) | ||
{ | ||
print("WARN", message); | ||
} | ||
|
||
public static void LogError(object message) | ||
{ | ||
print("ERROR", message); | ||
} | ||
|
||
private static void print(string level, object message) | ||
{ | ||
Console.WriteLine($"[{level}] {message}", message); | ||
} | ||
#else | ||
public static void Log(object message) | ||
{ | ||
UnityEngine.Debug.Log(message); | ||
} | ||
|
||
public static void LogWarning(object message) | ||
{ | ||
UnityEngine.Debug.LogWarning(message); | ||
} | ||
|
||
public static void LogError(object message) | ||
{ | ||
UnityEngine.Debug.Log(message); | ||
} | ||
#endif | ||
} | ||
} |
Oops, something went wrong.