예제 #1
0
 private void    UpdateLog(int consoleIndex, UnityLogEntry unityLog)
 {
     if (consoleIndex < this.rows.Count)
     {
         // Just update the bare necessities.
         this.rows[consoleIndex].log.collapseCount = unityLog.collapseCount;
     }
 }
예제 #2
0
        private void    ConvertNewLog(int consoleIndex, UnityLogEntry unityLog)
        {
            LogSettings settings = HQ.Settings.Get <LogSettings>();

            for (int j = 0; j < NGConsoleWindow.rowDrawers.Length; j++)
            {
                if ((bool)NGConsoleWindow.rowDrawers[j].attribute.handler(unityLog) == true)
                {
                    Row      row = Activator.CreateInstance(NGConsoleWindow.rowDrawers[j].type) as Row;
                    LogEntry log = new LogEntry();

                    log.Set(unityLog);
                    log.frameCount         = Time.frameCount;
                    log.renderedFrameCount = Time.renderedFrameCount;

                    if (settings.displayTime == true)
                    {
                        try
                        {
                            log.time = DateTime.Now.ToString(settings.timeFormat);
                        }
                        catch
                        {
                            log.time = "00:00:00";
                        }
                    }

                    row.Init(this, log);

                    if (rows.Count <= consoleIndex)
                    {
                        rows.Add(row);
                    }
                    else
                    {
                        InternalNGDebug.LogFile(rows.Count + " < " + consoleIndex);
                        rows[consoleIndex] = row;
                    }

                    if (this.CheckNewLogConsume != null)
                    {
                        this.CheckNewLogConsume(consoleIndex, row);
                    }
                    if (this.PropagateNewLog != null)
                    {
                        this.PropagateNewLog(consoleIndex, row);
                    }

                    return;
                }
            }

            InternalNGDebug.LogFile("No Row can handle this log:" + unityLog);
        }
예제 #3
0
        public void     Set(UnityLogEntry uLogEntry)
        {
            this.condition  = uLogEntry.condition;
            this.errorNum   = uLogEntry.errorNum;
            this.fileHash   = this.GetHashForFile(uLogEntry.file);
            this.line       = uLogEntry.line;
            this.mode       = (Mode)uLogEntry.mode;
            this.instanceID = uLogEntry.instanceID;
            //this.identifier = uLogEntry.identifier;
            //this.isWorldPlaying = uLogEntry.isWorldPlaying;

            this.collapseCount = uLogEntry.collapseCount;
        }
예제 #4
0
 private static bool     CanDealWithIt(UnityLogEntry log)
 {
     return(log.condition[0] == InternalNGDebug.JSONStartChar);
 }
예제 #5
0
 private static bool     CanDealWithIt(UnityLogEntry log)
 {
     return(true);
 }