コード例 #1
0
 public static void Log(object message, UnityEngine.Object context, LogColor color = LogColor.blue)
 {
     if (Enable)
     {
         Debug.Log(string.Format("<color={1}> {0} </color>", message, context, color.ToString()));
     }
 }
コード例 #2
0
 public static void ColoredLog(string message, LogColor color)
 {
     Debug.Log("<color=" + color.ToString() + ">" + message + "</color>");
 }
コード例 #3
0
 public static void Log(string log, LogColor color = LogColor.Gray)
 {
     log = string.Format("<color={1}>{0}</color>", log, color.ToString());
     Debug.Log(log);
 }
コード例 #4
0
    private static string LogColorToHex(LogColor _color)
    {
        switch (_color.ToString())
        {
        case "Red":
            return("ff0000ff");

        case "Green":
            return("008000ff");

        case "Blue":
            return("0000ffff");

        case "Aqua":
            return("00ffffff");

        case "Black":
            return("000000ff");

        case "Brown":
            return("a52a2aff");

        case "Cyan":
            return("00ffffff");

        case "Darkblue":
            return("0000a0ff");

        case "Fuchsia":
            return("ff00ffff");

        case "Grey":
            return("808080ff");

        case "Lightblue":
            return("add8e6ff");

        case "Lime":
            return("00ff00ff");

        case "Magenta":
            return("ff00ffff");

        case "Maroon":
            return("800000ff");

        case "Navy":
            return("000080ff");

        case "Olive":
            return("808000ff");

        case "Orange":
            return("ffa500ff");

        case "Purple":
            return("800080ff");

        case "Silver":
            return("c0c0c0ff");

        case "Teal":
            return("008080ff");

        case "Yellow":
            return("ffff00ff");

        default:
            return(null);
        }
    }