static function CanStreamedLevelBeLoaded (levelIndex : int) : bool
Description描述
Can the streamed level be loaded?
能流模式加载的关卡是否被加载?
参见: GetStreamProgressForLevel 函数.
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Update() {
if (Application.CanStreamedLevelBeLoaded(1))
Application.LoadLevel(1);
}
}
// Check if level at index 1 can be loaded.
// If it can be loaded then load it.
//检查如果索引为1的关卡可以被加载
//如果能被加载就加载它
function Update() {
if (Application.CanStreamedLevelBeLoaded(1)) {
Application.LoadLevel(1);
}
}
• static function CanStreamedLevelBeLoaded (levelName : string) : bool
Description描述
Can the streamed level be loaded?
能流模式加载的关卡是否被加载?
参见: GetStreamProgressForLevel 函数.
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Update() {
if (Application.CanStreamedLevelBeLoaded("Level1"))
Application.LoadLevel("Level1");
}
}
// Check if "Level1" can be loaded, if it can be loaded then load it.
//检查如果Level1可以加载,如果能加载就加载它
function Update() {
if (Application.CanStreamedLevelBeLoaded("Level1")) {
Application.LoadLevel("Level1");
}
}