internal void GetScene(string name, Action callBack, LoadPriority priority = LoadPriority.Default) { if (GOERoot.IsEditor || HasLoaded(name) || ResourceMgr.IsBundleCached(name + ".bundle")) { if (mCurScene != name) { LoadScene(name); if (callBack != null) { callBack(); } return; } else { removeBundle(name); } } string bundleName = this.ResourceMgr.GetBundleName(name); if (string.IsNullOrEmpty(bundleName)) { bundleName = this.ResourceMgr.GetBundleName(name + ".unity"); } if (bundleName == string.Empty) { Logger.GetFile(LogFile.Res).LogError("can not find scene: " + name); return; } mCurScene = name; Resource res = this.GetDownloadResource(bundleName); if (res == null) { res = this.CreateResource(bundleName, priority); res.LoadRes(); } //逻辑加载时,提高优先级// if (res.Loader.Priority < priority) { this.ResourceMgr.GOELoaderMgr.SetLoaderPriority(res.Loader, priority); } res.AddGotSceneCallback(callBack); }