Unity3d 帧率设置 及在游戏运行时显示帧率

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

在Unity3d 中可以通过代码设置 来限定游戏帧率。

Application.targetFrameRate=-1;

设置为 -1 表示不限定帧率。 转自http://blog.csdn.net/huutu

一般在手机游戏中我们限定帧率为30 就OK了。

Application.targetFrameRate=30;

但是把这个代码添加到工程之后,在Unity中运行起来发现并没有什么卵用。。。。

转自http://blog.csdn.net/huutu

于是到官网查看资料

http://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html

Application.targetFrameRatepublic static int targetFrameRate;DescriptionInstructs game to try to render at a specified frame rate.Setting targetFrameRate to -1 (the default) makes standalone games render as fast as they can, and web player games to render at 50-60 frames/second depending on the platform.Note that settin
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值