Exemple #1
0
        public static void Event(string eventName, Color color, string format, params object[] args)
        {
            if (!isDebugBuild)
            {
                return;
            }

            if (DisableEventNames.Contains(eventName))
            {
                return;
            }

            Event(eventName, color, string.Format(format, args));
        }
Exemple #2
0
        public static void Event(string eventName, Color color, string message)
        {
            if (!isDebugBuild)
            {
                return;
            }

            if (DisableEventNames.Contains(eventName))
            {
                return;
            }

            using (new DisableStackTraceScope(LogType.Log))
            {
                var colorCode = color.ColorToHex(false);

                Debug.Log(string.Format("<color=#{0}><b>[{1}]</b></color> {2}", colorCode, eventName, message));
            }
        }
Exemple #3
0
        public static void Event(string eventName, Color color, string message, LogType logType = LogType.Log)
        {
            if (!Enable)
            {
                return;
            }

            if (DisableEventNames.Contains(eventName))
            {
                return;
            }

            #if UNITY_EDITOR
            if (!CheckEnable(eventName))
            {
                return;
            }
            #endif

            var colorCode = color.ColorToHex(false);

            var text = string.Format("<color=#{0}><b>[{1}]</b></color> {2}", colorCode, eventName, message);

            if (enableNextLogStackTrace)
            {
                LogOutput(logType, text);
            }
            else
            {
                using (new DisableStackTraceScope())
                {
                    LogOutput(logType, text);
                }
            }

            enableNextLogStackTrace = false;
        }