找回密碼
 注冊帳號

掃一掃,訪問微社區

application.targetframerate 目標幀速率

2014-12-31 10:16| 發布者: 楊炎| 查看: 2502| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: application.targetframerate 目標幀速率static vartargetframerate: intdescription描述instructs game to try to render at a specified frame rate.命令游戲嘗試以一個特定的幀率渲染。setting targetframerate t ...

application.targetframerate 目標幀速率

static vartargetframerate: int

description描述

instructs 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.

設置targetframerate為-1(默認)使獨立版游戲盡可能快的渲染,并且web播放器游戲以50-60幀/秒渲染,取決于平臺。

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不會保證幀率,會因為平臺的不同而波動,或者因為計算機太慢而不能取得這個幀率。

targetframerate is ignored in the editor.

編輯器中targetframerate被忽略。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

void awake() {

application.targetframerate = 300;

}

}

function awake () {

// make the game run as fast as possible in the web player

//使游戲盡可能快的運行,在web播放器里

application.targetframerate = 300;

}

相關閱讀

文章點評
相關文章
女校游泳队彩金