Пример #1
0
        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;
        }
Пример #2
0
 public static void LogErrorColor(string message, LogColor color)
 {
     message = color.Prefix + message + color.Postfix;
     TimiDebug.LogError(message);
 }