Esempio n. 1
0
        /// <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>
        public static void LogWarning(DebugFlag debugFlag, object message)
        {
#if UNITY_EDITOR
            if (debugFlag.Value)
            {
                Debug.LogWarning("[DebugFlag: " + debugFlag.Name + "] " + message);
            }
#endif
        }
Esempio n. 2
0
        /// <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="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 LogFormat(DebugFlag debugFlag, UnityObject context, string format, params object[] args)
        {
#if UNITY_EDITOR
            if (debugFlag.Value)
            {
                Debug.LogFormat(context, "[DebugFlag: " + debugFlag.Name + "] " + format, args);
            }
#endif
        }
Esempio n. 3
0
        /// <summary>
        /// Logs a 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 Log(DebugFlag debugFlag, object message, UnityObject context)
        {
#if UNITY_EDITOR
            if (debugFlag.Value)
            {
                Debug.Log("[DebugFlag: " + debugFlag.Name + "] " + message, context);
            }
#endif
        }
Esempio n. 4
0
        /// <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="format">A composite format string</param>
        /// <param name="args">Format arguments</param>
        public static void LogErrorFormat(DebugFlag debugFlag, string format, params object[] args)
        {
#if UNITY_EDITOR
            if (m_AlwaysLogErrors || debugFlag.Value)
            {
                Debug.LogErrorFormat("[DebugFlag: " + debugFlag.Name + "] " + format, args);
            }
#endif
        }
Esempio n. 5
0
        /// <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>
        public static void LogError(DebugFlag debugFlag, object message)
        {
#if UNITY_EDITOR
            if (m_AlwaysLogErrors || debugFlag.Value)
            {
                Debug.LogError("[DebugFlag: " + debugFlag.Name + "] " + message);
            }
#endif
        }
Esempio n. 6
0
        /// <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="format">A composite format string</param>
        /// <param name="args">Format arguments</param>
        public static void LogWarningFormat(DebugFlag debugFlag, string format, params object[] args)
        {
#if UNITY_EDITOR
            if (debugFlag.Value)
            {
                Debug.LogWarningFormat("[DebugFlag: " + debugFlag.Name + "] " + format, args);
            }
#endif
        }