Пример #1
0
        public static void Log(string text, Color color)
        {
#if UNITY_EDITOR && !DISABLE_EDITOR_DEBUG
            UnityEngine.Debug.Log(Dev.FunctionHeader() + Dev.Colorize(text, Dev.ColorToHex(color)));
#else
            DevLoggingOutput.Instance.Log(Dev.FunctionHeader() + Dev.Colorize(text, Dev.ColorToHex(color)));
#endif
        }
Пример #2
0
        public static void PrintHideFlagsInChildren(GameObject parent, bool print_nones = false)
        {
#if UNITY_EDITOR && !DISABLE_EDITOR_DEBUG
            bool showed_where = false;

            if (print_nones)
            {
                Dev.Where();
                showed_where = true;
            }

            foreach (Transform child in parent.GetComponentsInChildren <Transform>())
            {
                if (print_nones && child.gameObject.hideFlags == HideFlags.None)
                {
                    UnityEngine.Debug.Log(Dev.Colorize(child.gameObject.name, Dev.ColorToHex(Color.white)) + ".hideflags = " + Dev.Colorize(Convert.ToString(child.gameObject.hideFlags), _param_color));
                }
                else if (child.gameObject.hideFlags != HideFlags.None)
                {
                    if (!showed_where)
                    {
                        Dev.Where();
                        showed_where = true;
                    }
                    UnityEngine.Debug.Log(Dev.Colorize(child.gameObject.name, Dev.ColorToHex(Color.white)) + ".hideflags = " + Dev.Colorize(Convert.ToString(child.gameObject.hideFlags), _param_color));
                }
            }
#else
            bool showed_where = false;

            if (print_nones)
            {
                Dev.Where();
                showed_where = true;
            }

            foreach (Transform child in parent.GetComponentsInChildren <Transform>())
            {
                if (print_nones && child.gameObject.hideFlags == HideFlags.None)
                {
                    DevLoggingOutput.Instance.Log(Dev.Colorize(child.gameObject.name, Dev.ColorToHex(Color.white)) + ".hideflags = " + Dev.Colorize(Convert.ToString(child.gameObject.hideFlags), _param_color));
                }
                else if (child.gameObject.hideFlags != HideFlags.None)
                {
                    if (!showed_where)
                    {
                        Dev.Where();
                        showed_where = true;
                    }
                    DevLoggingOutput.Instance.Log(Dev.Colorize(child.gameObject.name, Dev.ColorToHex(Color.white)) + ".hideflags = " + Dev.Colorize(Convert.ToString(child.gameObject.hideFlags), _param_color));
                }
            }
#endif
        }
Пример #3
0
 public static string ColorString(string input, Color color)
 {
     return(Dev.Colorize(input, Dev.ColorToHex(color)));
 }
Пример #4
0
 public static void SetParamColor(Color c)
 {
     Dev._param_color = Dev.ColorToHex(c);
 }
Пример #5
0
 public static void SetLogColor(Color c)
 {
     Dev._log_color = Dev.ColorToHex(c);
 }
Пример #6
0
 public static void SetMethodColor(Color c)
 {
     Dev._method_color = Dev.ColorToHex(c);
 }