public static void PrintCodePosition(LogColor logColor) { StackFrame stackFrame = new System.Diagnostics.StackFrame(1, true); string message = "-> { " + stackFrame.GetMethod().ToString() + " }"; string[] filePath = stackFrame.GetFileName().Split('/'); message += " in " + filePath[filePath.Length - 1]; // Append the file name message += "::" + stackFrame.GetFileLineNumber().ToString(); TimiDebug.LogColor(message, logColor); return; }
public static void LogErrorColor(string message, LogColor color) { message = color.Prefix + message + color.Postfix; TimiDebug.LogError(message); }