Exemple #1
0
        /// Kick off loading and analysing the profile, showing the progress on a progress bar.
        private void AnalyzeProfile()
        {
            m_Data = new ProfileDataset();
            Action <float> progressBar = delegate(float f) {
                string message = (f < 0.75f) ? "Reading profile data" : "Analyzing profile data";
                EditorUtility.DisplayProgressBar("Loading Profile", message, f);
            };

            try {
                m_Data.AnalyzeProfilerData(progressBar);
                m_Histogram = new Histogram();
                m_Histogram.AnalyseData(m_Data.Root);
                m_Expanded = new HashSet <int>();
                m_Scroll   = Vector2.zero;
            } finally {
                EditorUtility.ClearProgressBar();
            }
        }