纳金网

标题: 如何在移动端,显示游戏状态信息?Draw Call、FPS、Tris... [打印本页]

作者: gogomercury    时间: 2014-4-28 20:30
标题: 如何在移动端,显示游戏状态信息?Draw Call、FPS、Tris...
显示这样的调试、状态信息:

状态信息栏.jpg



作者: 狂风大尉    时间: 2014-4-28 20:45
在移动端显示这个做啥
作者: hyui    时间: 2014-4-28 20:52
What do you mean? You need to show info on the screen?
作者: 狂风大尉    时间: 2014-4-28 20:59
估计是可以调用的,查下API
作者: gogomercury    时间: 2014-4-28 23:18
hyui 发表于 2014-4-28 20:52
What do you mean? You need to show info on the screen?

这个信息能在编辑器的screen中显示出来,我想让它再其他平台上也能显示。
作者: gogomercury    时间: 2014-4-28 23:20
zasada 发表于 2014-4-28 20:53
Nice question, did you find answer?

没有,自己只弄了个能显示FPS的。
作者: gogomercury    时间: 2014-4-28 23:24
狂风大尉 发表于 2014-4-28 20:59
估计是可以调用的,查下API

没查到有API可调用..

只知道显示FPS,Draw Calls或者Tris有办法吗?
  1. using UnityEngine;
  2. using System.Collections;

  3. public class FPSdisplay : MonoBehaviour {
  4.     float frames = 0;
  5.     float fps = 0;
  6.     float lastInterval;
  7.     GUIText myGUIText;

  8.         void Start () {
  9.         lastInterval = Time.realtimeSinceStartup;
  10.         myGUIText = guiText;
  11.         }
  12.        
  13.     void Update(){
  14.         ++frames;
  15.         fps = frames / (Time.realtimeSinceStartup - lastInterval);
  16.         myGUIText.text = "FPS:" + fps.ToString("f2");
  17.     }

  18. }
复制代码

作者: q755456    时间: 2014-4-29 09:32
有必要吗,除了帧数会不一样,其他的参数手机上和编辑器上市一样的呀,你直接在编辑器上看不就好了
作者: suke    时间: 2014-4-29 09:50
楼主可以看一下这个插件。
FPS Graph
https://www.assetstore.unity3d.com/#/content/6513
作者: ZackD    时间: 2014-4-29 13:22
FPS Graph Performance Analyzer - 性能分析器
http://www.narkii.com/club/thread-301692-1.html

作者: gogomercury    时间: 2014-4-29 17:48
ZackD 发表于 2014-4-29 13:22
FPS Graph Performance Analyzer - 性能分析器
http://www.narkii.com/club/thread-301692-1.html

谢谢!这个插件挺不错!
作者: gogomercury    时间: 2014-4-29 17:48
suke 发表于 2014-4-29 09:50
楼主可以看一下这个插件。
FPS Graph
https://www.assetstore.unity3d.com/#/content/6513

谢谢!这个插件挺不错!
作者: 1547373072    时间: 2014-6-12 18:35
这个还没试过。




欢迎光临 纳金网 (http://c-www.narkii.com/club/) Powered by Discuz! X2.5