private void Initialize()
{
int len = ProfilerDriver.maxHistoryLength - 1;
this.m_Charts = new ProfilerChart[9];
Color[] colors = ProfilerColors.colors;
for (ProfilerArea area = ProfilerArea.CPU; area < ProfilerArea.AreaCount; area += 1)
{
float dataScale = 1f;
Chart.ChartType line = Chart.ChartType.Line;
string[] graphStatisticsPropertiesForArea = ProfilerDriver.GetGraphStatisticsPropertiesForArea(area);
int length = graphStatisticsPropertiesForArea.Length;
switch (area)
{
case ProfilerArea.GPU:
case ProfilerArea.CPU:
line = Chart.ChartType.StackedFill;
dataScale = 0.001f;
break;
}
ProfilerChart chart = new ProfilerChart(area, line, dataScale, length);
for (int i = 0; i < length; i++)
{
chart.m_Series[i] = new ChartSeries(graphStatisticsPropertiesForArea[i], len, colors[i % colors.Length]);
}
this.m_Charts[(int) area] = chart;
}
if (this.m_ReferenceListView == null)
{
this.m_ReferenceListView = new MemoryTreeList(this, null);
}
if (this.m_MemoryListView == null)
{
this.m_MemoryListView = new MemoryTreeListClickable(this, this.m_ReferenceListView);
}
this.UpdateCharts();
this.BuildColumns();
foreach (ProfilerChart chart2 in this.m_Charts)
{
chart2.LoadAndBindSettings();
}
}