GetFormattedStatisticsValue() private method

private GetFormattedStatisticsValue ( int frame, int identifier ) : string
frame int
identifier int
return string
コード例 #1
0
        public virtual int DoChartGUI(int currentFrame, bool active)
        {
            if (Event.current.type == EventType.Repaint)
            {
                string[] labels = new string[m_Series.Length];
                for (int s = 0; s < m_Series.Length; s++)
                {
                    string name =
                        m_Data.hasOverlay ?
                        "Selected" + m_Series[s].name :
                        m_Series[s].name;
                    int identifier = ProfilerDriver.GetStatisticsIdentifierForArea(m_Area, name);
                    labels[s] = ProfilerDriver.GetFormattedStatisticsValue(currentFrame, identifier);
                }
                m_Data.AssignSelectedLabels(labels);
            }

            if (legendHeaderLabel == null)
            {
                string iconName = string.Format("Profiler.{0}", System.Enum.GetName(typeof(ProfilerArea), m_Area));
                legendHeaderLabel = EditorGUIUtility.TextContentWithIcon(GetLocalizedChartName(), iconName);
            }

            return(DoGUI(m_Type, currentFrame, m_Data, active));
        }
コード例 #2
0
 public int DoChartGUI(int currentFrame, ProfilerArea currentArea, out Chart.ChartAction action)
 {
     if (Event.current.type == EventType.Repaint)
     {
         string[] strArray = new string[this.m_Series.Length];
         for (int index = 0; index < this.m_Series.Length; ++index)
         {
             int statisticsIdentifier = ProfilerDriver.GetStatisticsIdentifier(!this.m_Data.hasOverlay ? this.m_Series[index].identifierName : "Selected" + this.m_Series[index].identifierName);
             strArray[index] = ProfilerDriver.GetFormattedStatisticsValue(currentFrame, statisticsIdentifier);
         }
         this.m_Data.selectedLabels = strArray;
     }
     if (this.m_Icon == null)
     {
         this.m_Icon = EditorGUIUtility.TextContentWithIcon(this.GetLocalizedChartName(), "Profiler." + Enum.GetName(typeof(ProfilerArea), (object)this.m_Area));
     }
     return(this.m_Chart.DoGUI(this.m_Type, currentFrame, this.m_Data, this.m_Area, currentArea == this.m_Area, this.m_Icon, out action));
 }
コード例 #3
0
 public int DoChartGUI(int currentFrame, ProfilerArea currentArea, out Chart.ChartAction action)
 {
     if (Event.current.type == EventType.Repaint)
     {
         string[] array = new string[this.m_Series.Length];
         for (int i = 0; i < this.m_Series.Length; i++)
         {
             string propertyName         = (!this.m_Data.hasOverlay) ? this.m_Series[i].identifierName : ("Selected" + this.m_Series[i].identifierName);
             int    statisticsIdentifier = ProfilerDriver.GetStatisticsIdentifier(propertyName);
             array[i] = ProfilerDriver.GetFormattedStatisticsValue(currentFrame, statisticsIdentifier);
         }
         this.m_Data.selectedLabels = array;
     }
     if (this.m_Icon == null)
     {
         this.m_Icon = EditorGUIUtility.TextContent("Profiler." + Enum.GetName(typeof(ProfilerArea), this.m_Area));
     }
     return(this.m_Chart.DoGUI(this.m_Type, currentFrame, this.m_Data, this.m_Area, currentArea == this.m_Area, this.m_Icon, out action));
 }
コード例 #4
0
 public virtual int DoChartGUI(int currentFrame, ProfilerArea currentArea)
 {
     if (Event.current.type == EventType.Repaint)
     {
         string[] array = new string[this.m_Series.Length];
         for (int i = 0; i < this.m_Series.Length; i++)
         {
             string propertyName         = (!this.m_Data.hasOverlay) ? this.m_Series[i].name : ("Selected" + this.m_Series[i].name);
             int    statisticsIdentifier = ProfilerDriver.GetStatisticsIdentifier(propertyName);
             array[i] = ProfilerDriver.GetFormattedStatisticsValue(currentFrame, statisticsIdentifier);
         }
         this.m_Data.AssignSelectedLabels(array);
     }
     if (base.legendHeaderLabel == null)
     {
         string icon = string.Format("Profiler.{0}", Enum.GetName(typeof(ProfilerArea), this.m_Area));
         base.legendHeaderLabel = EditorGUIUtility.TextContentWithIcon(this.GetLocalizedChartName(), icon);
     }
     return(base.DoGUI(this.m_Type, currentFrame, this.m_Data, currentArea == this.m_Area));
 }