Exemplo n.º 1
0
    protected void Verbose(VerboseMask mask, string content)
    {
#if UNITY_EDITOR
        if (!CompareMask(DebugMode, mask))
        {
            return;
        }

        content = "[DEBUG]<" + this + ">: " + content;
        switch (mask)
        {
        case VerboseMask.Log:
            Debug.Log(content);
            break;

        case VerboseMask.WarningLog:
            Debug.LogWarning(content);
            break;

        case VerboseMask.ErrorLog:
            Debug.LogError(content);
            break;

        default:
            Debug.Log("[GIZMO]-" + content);
            break;
        }
#endif
    }
Exemplo n.º 2
0
    protected bool HasFlag(VerboseMask flag)
    {
#if UNITY_EDITOR
        return((DebugMode & flag) != 0);
#else
        return(false);
#endif
    }
Exemplo n.º 3
0
    protected bool CompareMask(VerboseMask a, VerboseMask b)
    {
#if UNITY_EDITOR
        return((a & b) != 0);
#else
        return(false);
#endif
    }