/// <summary> /// </summary> /// <param name="lvl"></param> /// <param name="name"></param> /// <param name="msg"></param> /// <param name="args"></param> public void Message(Logger.Level lvl, string name, string msg, object[] args) { if (lvl < Level) { return; } var curTime = DateTime.Now; var line = Format.Replace("%LV", lvl.ToString()) .Replace("%T", curTime.ToString(TimeFormat)) .Replace("%NAME", name) .Replace("%MSG", string.Format(msg, args)); if (lvl < Logger.Level.InternalWarning) { Debug.Log(line); } else if (lvl < Logger.Level.InternalError) { Debug.LogWarning(line); } else { Debug.LogError(line); } }