找回密碼
 注冊帳號

掃一掃,訪問微社區

application.getstreamprogressforlevel 獲取關卡的流進度

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

摘要: application.getstreamprogressforlevel 獲取關卡的流進度static functiongetstreamprogressforlevel(levelindex: int) : floatdescription描述how far has the download progressed? 下載的進度是多少?in the webp ...

application.getstreamprogressforlevel 獲取關卡的流進度

static functiongetstreamprogressforlevel(levelindex: int) : float

description描述

how far has the download progressed? [0...1]

下載的進度是多少?

in the webplayer this returns the progress of this level.

在web播放器中這將返回這個關卡的進度。

參見:canstreamedlevelbeloaded函數.

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public float percentageloaded = 0;

void update() {

if (application.getstreamprogressforlevel(1) == 1)

guitext.text = "level at index 1 has been fully streamed!";

else {

percentageloaded = application.getstreamprogressforlevel(1) * 100;

guitext.text = percentageloaded.tostring();

}

}

}

// print on a guitext how much has been streamed level at index 1

//在文本框打印在場景1里下載了多少?

// when finished streaming, print "level 1 has been fully streamed!"

//當完成時,打印"level 1 has been fully streamed!"

var percentageloaded : float = 0;

function update() {

if(application.getstreamprogressforlevel(1) == 1) {

guitext.text = "level at index 1 has been fully streamed!";

} else {

percentageloaded = application.getstreamprogressforlevel(1) * 100;

guitext.text = percentageloaded.tostring();

}

}

o static functiongetstreamprogressforlevel(levelname: string) : float

description描述

how far has the download progressed? [0...1]

下載的進度是多少?

in the webplayer this returns the progress of this level.

在web播放器中這將返回這個關卡的進度。

參見:canstreamedlevelbeloaded函數

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public float percentageloaded = 0;

void update() {

if (application.getstreamprogressforlevel("level1") == 1)

guitext.text = "level 1 has been fully streamed!";

else {

percentageloaded = application.getstreamprogressforlevel("level1") * 100;

guitext.text = percentageloaded.tostring();

}

}

}

// print on a guitext how much has been streamed "level1"

//在文本框打印在場景"level1"里下載了多少?

// when finished streaming, print "level1 has been fully streamed!"

//當完成時,打印"level 1 has been fully streamed!"

var percentageloaded : float = 0;

function update() {

if(application.getstreamprogressforlevel("level1") == 1) {

guitext.text = "level 1 has been fully streamed!";

} else {

percentageloaded = application.getstreamprogressforlevel("level1") * 100;

guitext.text = percentageloaded.tostring();

}

}

相關閱讀

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