forked from Shardstone/trail-into-darkness
Added a bunch of utilities and modfief the character data structue
This commit is contained in:
42
Packages/com.jovian.utilties/Runtime/BowserLog.cs
Normal file
42
Packages/com.jovian.utilties/Runtime/BowserLog.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using UnityEngine;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
namespace Jovian.Utilities {
|
||||
|
||||
public static class BowserLog {
|
||||
|
||||
private const string PREFIX = "Bowser:";
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), DebuggerHidden]
|
||||
public static void Log(string log, object obj = null) {
|
||||
Debug.Log(obj == null ? $"{PREFIX}{log}" : $"{PREFIX}[{obj.GetType().Name}] {log}", obj as Object);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), DebuggerHidden]
|
||||
public static void LogWarning(string log, object obj = null) {
|
||||
Debug.LogWarning(obj == null ? $"{PREFIX}{log}" : $"{PREFIX}[{obj.GetType().Name}] {log}", obj as Object);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining), DebuggerHidden]
|
||||
public static void LogError(string log, object obj = null) {
|
||||
Debug.LogError(obj == null ? $"{PREFIX}{log}" : $"{PREFIX}[{obj.GetType().Name}] {log}", obj as Object);
|
||||
}
|
||||
|
||||
[Conditional("UNITY_EDITOR"), Conditional("DEVELOPMENT_BUILD"), DebuggerHidden]
|
||||
public static void LogDebug(string log, object obj = null) {
|
||||
Debug.Log(obj == null ? $"{PREFIX}{log}" : $"{PREFIX}[{obj.GetType().Name}] {log}", obj as Object);
|
||||
}
|
||||
|
||||
[Conditional("UNITY_EDITOR"), Conditional("DEVELOPMENT_BUILD"), DebuggerHidden]
|
||||
public static void LogWarningDebug(string log, object obj = null) {
|
||||
Debug.LogWarning(obj == null ? $"{PREFIX}{log}" : $"{PREFIX}[{obj.GetType().Name}] {log}", obj as Object);
|
||||
}
|
||||
|
||||
[Conditional("UNITY_EDITOR"), Conditional("DEVELOPMENT_BUILD"), DebuggerHidden]
|
||||
public static void LogErrorDebug(string log, object obj = null) {
|
||||
Debug.LogError(obj == null ? $"{PREFIX}{log}" : $"{PREFIX}[{obj.GetType().Name}] {log}", obj as Object);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user