예제 #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
        }
예제 #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
        }
예제 #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
        }
예제 #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
        }
예제 #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
        }
예제 #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
        }