- 最后登录
- 2014-10-23
- 注册时间
- 2011-7-19
- 阅读权限
- 90
- 积分
- 81303
- 纳金币
- -1
- 精华
- 11
|
今天在翻官方的帮助手册,发现原来unity3d程序也可以设置默认的运行帧频,就像在flash中的帧频功能一样,只不过在unity3d中并不能百分百的让程序按固定帧频来运行,毕竟这牵涉到一个硬件性能的问题。下面看看用到是是哪一个类及相关属性:
Application.targetFrameRate
static var targetFrameRate : int
Description
Ins***cts 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 setting targetFrameRate does not guarantee that frame rate. There can be fluctuations due to platform specifics, or the game might not achieve the frame rate because the computer is too slow.
targetFrameRate is ignored in the editor.
function Awake ()
{
// Make the game***n as fast as possible in the web player
Application.targetFrameRate = 300;
}
由 uke 发表
|
|