mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-28 19:48:47 +00:00
Optimized asset system and patch system framework
优化了资源定位不正确导致的错误报告方式。 YooAssets.ProcessOperation()重命名为YooAssets.StartOperation() YooAssets.GetBundleInfo()已经移除方法。 YooAssets.IsNeedDownloadFromRemote()新增加方法。
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
@@ -22,11 +23,10 @@ namespace YooAsset
|
||||
}
|
||||
}
|
||||
|
||||
public BundledSceneProvider(string scenePath, LoadSceneMode sceneMode, bool activateOnLoad, int priority)
|
||||
: base(scenePath, null)
|
||||
public BundledSceneProvider(AssetInfo assetInfo, LoadSceneMode sceneMode, bool activateOnLoad, int priority) : base(assetInfo)
|
||||
{
|
||||
SceneMode = sceneMode;
|
||||
_sceneName = System.IO.Path.GetFileNameWithoutExtension(scenePath);
|
||||
_sceneName = Path.GetFileNameWithoutExtension(assetInfo.AssetPath);
|
||||
_activateOnLoad = activateOnLoad;
|
||||
_priority = priority;
|
||||
}
|
||||
@@ -43,15 +43,15 @@ namespace YooAsset
|
||||
// 1. 检测资源包
|
||||
if (Status == EStatus.CheckBundle)
|
||||
{
|
||||
if (DependBundles.IsDone() == false)
|
||||
if (DependBundleGroup.IsDone() == false)
|
||||
return;
|
||||
if (OwnerBundle.IsDone() == false)
|
||||
return;
|
||||
|
||||
if (DependBundles.IsSucceed() == false)
|
||||
if (DependBundleGroup.IsSucceed() == false)
|
||||
{
|
||||
Status = EStatus.Fail;
|
||||
LastError = DependBundles.GetLastError();
|
||||
LastError = DependBundleGroup.GetLastError();
|
||||
InvokeCompletion();
|
||||
return;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace YooAsset
|
||||
Status = SceneObject.IsValid() ? EStatus.Success : EStatus.Fail;
|
||||
if(Status == EStatus.Fail)
|
||||
{
|
||||
LastError = $"The load scene is invalid : {AssetPath}";
|
||||
LastError = $"The load scene is invalid : {MainAssetInfo.AssetPath}";
|
||||
YooLogger.Error(LastError);
|
||||
}
|
||||
InvokeCompletion();
|
||||
|
||||
Reference in New Issue
Block a user