Application.isLoadingLevel 正在加载关卡?
static var isLoadingLevel : bool
Description描述
Is some level being loaded? (Read Only)
是否有一些场景正在读取(只读)
另译:是否正在加载某些关卡。
LoadLevel and LoadLevelAdditive don't happen immediately - a new level is loaded after the current game frame finishes. isLoadingLevel returns true if a level load was requested this frame already.
方法 LoadLevel 和 LoadLevelAdditive 不会立即生效-一个新的场景在当前游戏帧完成之后被加载。如果一个被请求加载场景的帧已经完成了,那么isLoadingLevel返回值为true。
参见: LoadLevel , LoadLevelAdditive .
C#
JavaScript
using UnityEngine;using System.Collections;public class example : MonoBehaviour {public void Awake() {print(Application.isLoadingLevel);}}
print(Application.isLoadingLevel);