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 }
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 }
public static string ColorString(string input, Color color) { return(Dev.Colorize(input, Dev.ColorToHex(color))); }
public static void SetParamColor(Color c) { Dev._param_color = Dev.ColorToHex(c); }
public static void SetLogColor(Color c) { Dev._log_color = Dev.ColorToHex(c); }
public static void SetMethodColor(Color c) { Dev._method_color = Dev.ColorToHex(c); }