Ejemplo n.º 1
0
 public static void DrawLine(DebugPrefix type, Vector3 start, Vector3 end, Color?color = null, float duration = 1.0f, bool depthTest = true)
 {
     if (Check(type))
     {
         Debug.DrawLine(start, end, color ?? Color.blue, duration, depthTest);
     }
 }
Ejemplo n.º 2
0
 public static void Error(DebugPrefix type, string str)
 {
     if (Check(type))
     {
         str = type + DateTime.Now.ToString(": yyyyMMdd_HHmmss \r\n") + str;
         Debug.LogError(str);
     }
 }
Ejemplo n.º 3
0
    static bool IsEnable(DebugPrefixEnum prefix)
    {
        if (EnabledPrefixes == null)
        {
            var         prefixes    = Resources.LoadAll <DebugPrefix>("DebugPrefix");
            DebugPrefix debugPrefix = prefixes[0];
            EnabledPrefixes = debugPrefix.EnabledPrefixes;
        }

        return(EnabledPrefixes.FirstOrDefault(x => x.PrefixName == prefix.ToString()) != null);
    }
Ejemplo n.º 4
0
        static bool Check(DebugPrefix type)
        {
            int index = (int)type;

            if (Config != null)
            {
                if (Config.Enable && Config.Switch[index])
                {
                    return(true);
                }
            }
            else
            {
                if (Enable && Switch[index])
                {
                    return(true);
                }
            }
            return(false);
        }