switched to URP

This commit is contained in:
2022-11-11 19:19:54 +01:00
parent d8d3fbca59
commit 34bfdeb043
17 changed files with 456 additions and 180 deletions

View File

@@ -2,15 +2,25 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using System.Threading;
public class fps : MonoBehaviour
{
public TMP_Text fpsText;
[SerializeField] private float _hudRefreshRate = 1f;
private float _timer;
// Update is called once per frame
void Update()
{
int current = (int)(1f / Time.unscaledDeltaTime);
fpsText.text = "Fps: " + current.ToString();
/*int current = (int)(1f / Time.unscaledDeltaTime);
fpsText.text = "Fps: " + current.ToString();*/
if (Time.unscaledTime > _timer) {
int fps = (int)(1f / Time.unscaledDeltaTime);
fpsText.text = "FPS: " + fps;
_timer = Time.unscaledTime + _hudRefreshRate;
}
}
}