Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Fps : MonoBehaviour
- {
- private float count;
- private IEnumerator Start()
- {
- GUI.depth = 2;
- while (true)
- {
- count = 1f / Time.unscaledDeltaTime;
- yield return new WaitForSeconds(0.1f);
- }
- }
- private void OnGUI()
- {
- GUI.Label(new Rect(5, 40, 100, 25), "FPS: " + Mathf.Round(count));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement