- 最后登录
- 2014-10-1
- 注册时间
- 2013-8-19
- 阅读权限
- 20
- 积分
- 260
- 纳金币
- 36
- 精华
- 0
|
狂风大尉 发表于 2014-4-28 20:59
估计是可以调用的,查下API
没查到有API可调用..
只知道显示FPS,Draw Calls或者Tris有办法吗?- using UnityEngine;
- using System.Collections;
- public class FPSdisplay : MonoBehaviour {
- float frames = 0;
- float fps = 0;
- float lastInterval;
- GUIText myGUIText;
- void Start () {
- lastInterval = Time.realtimeSinceStartup;
- myGUIText = guiText;
- }
-
- void Update(){
- ++frames;
- fps = frames / (Time.realtimeSinceStartup - lastInterval);
- myGUIText.text = "FPS:" + fps.ToString("f2");
- }
- }
复制代码 |
|