29 lines
755 B
C#
29 lines
755 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace CustomLogger{
|
|
public static class Debug{
|
|
public static string loggedText{get; private set;}
|
|
public static void Log(object msg){
|
|
string output = $"[{DateTime.Now}] {msg}";
|
|
|
|
loggedText+=output+"\n";
|
|
|
|
UnityEngine.Debug.Log(output);
|
|
}
|
|
public static void LogError(object msg){
|
|
string output = $"* [{DateTime.Now}] {msg}";
|
|
|
|
loggedText+=output+"\n";
|
|
|
|
UnityEngine.Debug.LogError(output);
|
|
}
|
|
public static void LogWarning(object msg){
|
|
string output = $"![{DateTime.Now}] {msg}";
|
|
|
|
loggedText+=output+"\n";
|
|
|
|
UnityEngine.Debug.LogWarning(output);
|
|
}
|
|
}
|
|
} |