场景互换时的加载界面
大体思路:加载界面为单独场景。当触发场景跳转,跳转到A场景时,先跳转到加载场景,同时异步加载A场景。
异步加载代码:
AsyncOperation ao;
void Start () {
StartCoroutine(LoadLevel());
}
IEnumerator LoadLevel() {
ao = Application.LoadLevelAsync("1");
yield return ao;
}