如果我以前查看了iOS模式,例如Chartboost“更多应用”或GameCenter排行榜,则我对yield WaitForSeconds
的JavaScript调用无法完成。
代码:
function GoToScene(){
GameObject.Find("SceneFader").SendMessage("FadeToBlack");
GameObject.Find("MenuSounds").SendMessage("Play_select");
//code does not get past here
yield WaitForSeconds(0.254);
//Application.LoadLevel() is never called
Application.LoadLevel(this.scene);
}
模态是否锁定了所需的线程?
答案 0 :(得分:2)
模态是冻结时间,我能够使用以下方法修复它:
if (Time.timeScale == 0){
Time.timeScale = 1;
}