Пример #1
0
        public void UpdateOverlayData(int firstEmptyFrame)
        {
            m_Data.hasOverlay = true;
            int numCharts = m_Data.numSeries;

            for (int i = 0; i < numCharts; ++i)
            {
                var chart  = m_Data.series[i];
                var length = chart.yValues.Length;
                if (m_Data.overlays[i] == null || m_Data.overlays[i].yValues.Length != length)
                {
                    m_Data.overlays[i] = new ChartSeriesViewData(chart.name, chart.category, length, chart.color);
                }
                float maxValue;
                ProfilerDriver.GetCounterValuesBatch(ProfilerArea.CPU, UnityString.Format("Selected{0}", chart.name), firstEmptyFrame, 1.0f, m_Data.overlays[i].yValues, out maxValue);
                m_Data.overlays[i].yScale = m_DataScale;
            }
        }