How to round fps amount correct?
I think i should add f somewhere in Mathf.Round(fps);
But i don’t know where.
Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class fpsCounter : MonoBehaviour
{
public TMP_Text fpsCounter_txt;
void Update(){
float fps = 1 / Time.unscaledDeltaTime;
Mathf.Round(fps);
fpsCounter_txt.text = "fps: " + fps;
}
}
Thanks in advance.