Ejemplo n.º 1
0
            public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args)
            {
                string timePrefix = string.Format("[{0}:{1}.{2}] : ", DateTime.Now.Hour, DateTime.Now.Minute,
                                                  DateTime.Now.Second);

                switch (logType)
                {
                case LogType.Log:
                    Console.Print(timePrefix + string.Format(format, args), LogColor);
                    break;

                case LogType.Warning:
                    Console.Warning(timePrefix + string.Format(format, args));
                    break;

                case LogType.Assert:
                    Console.Error(timePrefix + "Failed Assertion!\n" + string.Format(format, args));
                    break;

                case LogType.Error:
                    Console.Error(timePrefix + string.Format(format, args));
                    break;

                case LogType.Exception:
                    Console.Error(timePrefix + "Unhandled Exception!\n" + string.Format(format, args));
                    break;
                }
                FallbackHandler.LogFormat(logType, context, format, args);
            }
Ejemplo n.º 2
0
 public void Error(string message)
 {
     Controller.Error(message);
 }