Ejemplo n.º 1
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();
     }
 }
Ejemplo n.º 2
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();
     }
 }