/// <summary> /// Logs a warning message to the Unity Console if the program is running from the Unity Editor and the value of debugFlag is true. /// </summary> /// <param name="debugFlag">Flag for whether the message should be logged to the console</param> /// <param name="message">Message to log to the console</param> /// <param name="context">Object to which the message applies</param> public static void LogWarning(DebugFlag debugFlag, object message, Object context) { #if UNITY_EDITOR if (debugFlag.Value) { Debug.LogWarning("[DebugFlag: " + debugFlag.Name + "] " + message, context); } #endif }
/// <summary> /// Logs a formatted warning message to the Unity Console if the program is running from the Unity Editor and the value of debugFlag is true. /// </summary> /// <param name="debugFlag">Flag for whether the message should be logged to the console</param> /// <param name="context">Object to which the message applies</param> /// <param name="format">A composite format string</param> /// <param name="args">Format arguments</param> public static void LogWarningFormat(DebugFlag debugFlag, Object context, string format, params object[] args) { #if UNITY_EDITOR if (debugFlag.Value) { Debug.LogWarningFormat(context, "[DebugFlag: " + debugFlag.Name + "] " + format, args); } #endif }
/// <summary> /// Logs a formatted message to the Unity Console if the program is running from the Unity Editor and the value of debugFlag is true. /// </summary> /// <param name="debugFlag">Flag for whether the message should be logged to the console</param> /// <param name="format">A composite format string</param> /// <param name="args">Format arguments</param> public static void logFormat(DebugFlag debugFlag, string format, params object[] args) { #if UNITY_EDITOR if (debugFlag.Value) { Debug.LogFormat("[DebugFlag: " + debugFlag.Name + "] " + format, args); } #endif }
/// <summary> /// Logs a formatted error message to the Unity Console if the program is running from the Unity Editor /// and either AlwaysLogErrors is true or the value of debugFlag is true.. /// </summary> /// <param name="debugFlag">Flag for whether the message should be logged to the console</param> /// <param name="context">Object to which the message applies</param> /// <param name="format">A composite format string</param> /// <param name="args">Format arguments</param> public static void LogErrorFormat(DebugFlag debugFlag, Object context, string format, params object[] args) { Debug.LogErrorFormat(context, "[DebugFlag: " + debugFlag.Name + "] " + format, args); }
/// <summary> /// Logs an error message to the Unity Console if the program is running from the Unity Editor /// and either AlwaysLogErrors is true or the value of debugFlag is true.. /// </summary> /// <param name="debugFlag">Flag for whether the message should be logged to the console</param> /// <param name="message">Message to log to the console</param> /// <param name="context">Object to which the message applies</param> public static void LogError(DebugFlag debugFlag, object message, Object context) { Debug.LogError("[DebugFlag: " + debugFlag.Name + "] " + message, context); }