Esempio n. 1
0
        public void GetEvents(float minTime, float maxTime, List <MonitorEvent> dest)
        {
            if (events.Count == 0)
            {
                return;
            }

            lookupEvent.time = minTime;
            int index = events.BinarySearch(lookupEvent, monitorEventComparer);

            if (index < 0)
            {
                index = ~index;
            }

            for (int i = index; i < events.Count; i++)
            {
                MonitorEvent monitorEvent = events[i];

                if (monitorEvent.time <= maxTime)
                {
                    dest.Add(monitorEvent);
                }
                else
                {
                    break;
                }
            }
        }
Esempio n. 2
0
        public void Add(MonitorEvent monitorEvent)
        {
            int index = events.BinarySearch(monitorEvent, monitorEventComparer);

            if (index < 0)
            {
                index = ~index;
            }

            events.Insert(index, monitorEvent);
        }
Esempio n. 3
0
        void LogCallback(string logString, string stackTrace, LogType type)
        {
            if (filterPrefix != string.Empty)
            {
                if (!logString.StartsWith(filterPrefix))
                {
                    return;
                }
            }

            MonitorEvent monitorEvent = new MonitorEvent();

            monitorEvent.time = Time.time;
            monitorEvent.text = logString;

            monitor.Add(monitorEvent);
        }