using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Getfps : MonoBehaviour {
int tick = 0;
float elapsed = 0;
float fps = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
tick++;
elapsed += Time.deltaTime;
if (elapsed >= 1f)
{
fps = tick / elapsed;
tick = 0;
elapsed = 0;
}
Debug.Log("FPS: "+fps);
}
}