public static void DisplayValue(string tag, object value) { DisplayerProjectSettings settings = DisplayerProjectSettings.Instance; if (settings.CreateDebugDisplayer && !InfoDisplayer.DisplayerExists(settings.debugDisplayerName)) { Tools.qASICObjectCreator.CreateDebugDisplyer(); if (settings.displayDebugGenerationMessage) { GameConsoleController.Log(settings.debugGenerationMessage, settings.debugGenerationMessageColor); } } InfoDisplayer.DisplayValue(tag, value == null ? "null" : value.ToString(), settings.debugDisplayerName); }
public static void Log(object message) => GameConsoleController.Log(message == null ? "null" : message.ToString(), "default");
public static void Log(object message, Color color) => GameConsoleController.Log(message == null ? "null" : message.ToString(), color);
public static void LogError(object message) => GameConsoleController.Log(message == null ? "null" : message.ToString(), "error");
public void ParseException(string text, string type) => GameConsoleController.Log($"Couldn't parse <b>{text}</b> to {type}!", "error", Logic.GameConsoleLog.LogType.Game);
public void NoOptionException(string option) => GameConsoleController.Log($"Option <b>{option}</b> does not exist!", "error", Logic.GameConsoleLog.LogType.Game);
public void LogError(string text) => GameConsoleController.Log(text, "error", Logic.GameConsoleLog.LogType.Game);
public void Log(string text, Color color) => GameConsoleController.Log(text, color, Logic.GameConsoleLog.LogType.Game);
public string ToText() { string log = Message.Replace('\r', '\n'); switch (Type) { case LogType.User: log = $">{Regex.Replace(log, "<.*?>", string.Empty)}"; break; case LogType.Game: log = $" {log}"; break; case LogType.Clear: log = " !clear"; break; default: log = $"?{log}"; break; } string colorHash = ColorUtility.ToHtmlStringRGB(string.IsNullOrWhiteSpace(ColorName) ? LogColor : GameConsoleController.GetColor(ColorName)); log = $"<color=#{colorHash}>[{Time:HH:mm:ss}]{log}</color>"; return(log); }