Log entry for the timeline.
コード例 #1
0
        /// <summary>
        /// Finalizes the log entry and records it.
        /// </summary>
        public void Dispose()
        {
            var end = Time.time;

            var source = TimelineLog.sources[this.source] as TimelineLogSource;

            if (source == null)
            {
                TimelineLog.sources[this.source]
                      = source
                      = new TimelineLogSource()
                    ;
                TimelineLog.TotalSources++;
            }

            var entries = source.Categories[this.category] as LinkedList <TimelineLogEntry>;

            if (entries == null)
            {
                source.Categories[this.category]
                      = entries
                      = new LinkedList <TimelineLogEntry>()
                    ;
                TimelineLog.TotalCategories++;
            }

            var entry = new TimelineLogEntry(this.message, this.start, end, this.Color);

            entries.AddLast(entry);

            TimelineLog.MaxTime = Mathf.Max(TimelineLog.MaxTime, entry.End);
        }
コード例 #2
0
ファイル: TimelineLog.cs プロジェクト: UnityContrib/framework
        /// <summary>
        /// Finalizes the log entry and records it.
        /// </summary>
        public void Dispose()
        {
            var end = Time.time;

            var source = TimelineLog.sources[this.source] as TimelineLogSource;
            if (source == null)
            {
                TimelineLog.sources[this.source]
                    = source
                    = new TimelineLogSource()
                    ;
                TimelineLog.TotalSources++;
            }

            var entries = source.Categories[this.category] as LinkedList<TimelineLogEntry>;
            if (entries == null)
            {
                source.Categories[this.category]
                    = entries
                    = new LinkedList<TimelineLogEntry>()
                    ;
                TimelineLog.TotalCategories++;
            }

            var entry = new TimelineLogEntry(this.message, this.start, end, this.Color);
            entries.AddLast(entry);

            TimelineLog.MaxTime = Mathf.Max(TimelineLog.MaxTime, entry.End);
        }