Exemple #1
0
        protected virtual void OnGUI()
#endif
        {
            if (ShowFps)
            {
                if (RenderWatcher == null)
                {
                    RenderWatcher = new FpsWatcher(0.95f);
                }
                RenderWatcher.OnUIUpdate();
            }

            UpdateEvent?.Invoke();
            float time = Time.time;

            if (time > time_update_per1s)
            {
                time_update_per1s = time + 1.0f;
                UpdatePer1sEvent?.Invoke();
            }
            if (time > time_update_per300ms)
            {
                time_update_per300ms = time + 0.3f;
                UpdatePer300msEvent?.Invoke();
            }
        }
Exemple #2
0
        protected virtual void OnGUI()
#endif
        {
            if (RenderWatcher != null)
            {
                RenderWatcher.OnUIUpdate(ShowFps);
            }
        }
Exemple #3
0
        protected virtual void OnGUI()
#endif
        {
            if (ShowFps)
            {
                if (RenderWatcher == null)
                {
                    RenderWatcher = new FpsWatcher(0.95f);
                }
                RenderWatcher.OnUIUpdate();
            }
        }
Exemple #4
0
 private void OnGUI()
 {
     if (ShowFps)
     {
         if (RenderWatcher == null)
         {
             RenderWatcher = new CFpsWatcher(0.95f);
         }
         GUILayout.BeginVertical(GUILayout.Width(300));
         GUILayout.Label(string.Format("Memory: {0:F3}KB", UnityEngine.Profiler.GetMonoUsedSize() / 1024f));
         GUILayout.Label(RenderWatcher.Watch("FPS: {0:N0}", 1f / Time.deltaTime));
         GUILayout.EndVertical();
     }
 }