using System.Collections; using System.Collections.Generic; using System.Threading; using UnityEngine.UI; using UnityEngine; public class FramePerSecond : MonoBehaviour { Rect fpsRect; GUIStyle style; void Start () { fpsRect = new Rect(100, 100, 400, 100); style = new GUIStyle(); style.fontSize = 30; } void Update() { } void OnGUI() { float fps = 1 / Time.deltaTime; OnGUI.Label(fpsRect, "FPS: " + fps); } }
void OnGUI() { float fps = 1 / Time.deltaTime; OnGUI.Label(fpsRect, "FPS: " + fps); }
OnGUI
void OnGUI() { float fps = 1 / Time.deltaTime; GUI.Label(fpsRect, "FPS: " + fps); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)