首页 > 其他分享 >unity3d:显示FPS

unity3d:显示FPS

时间:2022-11-01 11:04:24浏览次数:51  
标签:unity3d 显示 200 text System Collections FPS new font


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class FPSShow : MonoBehaviour {

private void OnGUI()
{
string text = string.Format(" FPS:{0}", 1.0f / Time.smoothDeltaTime);
GUIStyle font = new GUIStyle();
font.fontSize = 40;
GUI.Label(new Rect(0, 0, 200, 200), text, font);
}
}


标签:unity3d,显示,200,text,System,Collections,FPS,new,font
From: https://blog.51cto.com/u_15544328/5812305

相关文章