Esempio n. 1
0
    public void AddMessage(string msg, tags tag, Object trigger = null, [CallerMemberName] string callingMethod = "", [CallerFilePath] string callingFilePath = "", [CallerLineNumber] int callingFileLineNumber = 0)
    {
        if (ignoredTag.Contains(tag))
        {
            return;
        }

        DebugMessage dMsg = new DebugMessage(msg + "    [Timestamp: " + Time.realtimeSinceStartup + "], [Line: " +
                                             callingFileLineNumber + "], \n [Function: " + callingMethod + "], \n [File path: " + callingFilePath + "]", tag, trigger);

        dMsg.name = dMsg.tag + "(" + dMsg.GetHashCode() + ")";

        //UnityEditor.AssetDatabase.CreateAsset(dMsg, "Assets/AlexScripts/AlexToolScripts/Resources/" + dMsg.name + ".asset");

        messages.Add(dMsg);
    }