public void Update()
        {
#if !UNITY_EDITOR
            if (!CommonScriptableObjects.focusState.Get())
            {
                return;
            }
#endif
            if (!CommonScriptableObjects.rendererState.Get())
            {
                return;
            }

            var deltaInMs = Time.deltaTime * 1000;

            tracker.AddDeltaTime(Time.deltaTime);

            performanceMetricsDataVariable?.Set(tracker.CurrentFPSCount(), tracker.CurrentHiccupCount(), tracker.HiccupsSum, tracker.GetTotalSeconds());

            encodedSamples[currentIndex++] = (char)deltaInMs;

            if (currentIndex == SAMPLES_SIZE)
            {
                currentIndex = 0;
                Report(new string(encodedSamples));
                GenerateHiccupReport();
            }
        }
Ejemplo n.º 2
0
 private void GenerateHiccupReport()
 {
     WebInterface.SendPerformanceHiccupReport(tracker.CurrentHiccupCount(), tracker.GetHiccupSum(), tracker.GetTotalSeconds());
 }