1
This commit is contained in:
@@ -46,6 +46,8 @@ namespace BITKit
|
||||
[SerializeReference, SubclassSelector] private IRemoteServices remoteServices;
|
||||
[SerializeReference, SubclassSelector] private IBuildinQueryServices buildinQueryServices;
|
||||
|
||||
[SerializeField] private Optional<string> loadEntryScene;
|
||||
|
||||
[SerializeField] private UIDocument document;
|
||||
|
||||
[SerializeField] private bool isOffline;
|
||||
@@ -178,12 +180,23 @@ namespace BITKit
|
||||
YooAssetUtils.RegisterPackage(packageName.Value);
|
||||
YooAssetUtils.RegisterResourcePackage(package);
|
||||
|
||||
if (document)
|
||||
Destroy(document);
|
||||
SceneManager.LoadScene(1);
|
||||
if (loadEntryScene.Allow)
|
||||
{
|
||||
_progressLabel.text="正在加载场景...";
|
||||
await package.LoadSceneAsync(loadEntryScene.Value);
|
||||
if (document)
|
||||
Destroy(document);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (document)
|
||||
Destroy(document);
|
||||
SceneManager.LoadScene(1);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
await UniTask.SwitchToMainThread();
|
||||
_progressBar.value =0;
|
||||
_progressLabel.text = e.Message;
|
||||
}
|
||||
|
Reference in New Issue
Block a user