gmhevinci / MotionFramework

MotionFramework is unity3d game framework.
MIT License
621 stars 116 forks source link

使用编辑器模拟更新异常 #14

Closed MidiSmallYue closed 2 years ago

MidiSmallYue commented 2 years ago

版本:最新 master 和 patch demo 操作:1 . 更改 GameLauncher 创建 PatchUpdater 的参数代码为 updaterCreateParam.AutoDownloadDLC = new string[] { "buildin" };只下载 buildin 资源,其他加载的 时候 自动下载

  1. 打包 patch demo 资源,放到 服务器上,配置 GameVersion
  2. 运行 patch demo后,加载 lodinwindow 必现 报错: [MotionLog] WaitForAsyncComplete failed ! BundleName : assets/gameres/uipanel/loginwindow.bundle States : CheckDownload UnityEngine.Debug:LogError(Object) GameLauncher:HandleMotionFrameworkLog(ELogLevel, String) (at Assets/GameScript/Runtime/GameLauncher.cs:86) MotionFramework.MotionLog:Error(String) (at Assets/MotionFramework/Scripts/Runtime/Engine/Core/MotionLog.cs:42) MotionFramework.Resource.BundleFileLoader:WaitForAsyncComplete() (at Assets/MotionFramework/Scripts/Runtime/Engine/Engine.Resource/AssetSystem/Loader/BundleFileLoader.cs:306) MotionFramework.Resource.BundledAssetProvider:Update() (at Assets/MotionFramework/Scripts/Runtime/Engine/Engine.Resource/AssetSystem/Provider/BundledAssetProvider.cs:45) MotionFramework.Resource.AssetSystem:UpdatePoll() (at Assets/MotionFramework/Scripts/Runtime/Engine/Engine.Resource/AssetSystem/AssetSystem.cs:84) MotionFramework.Resource.ResourceManager:MotionFramework.IModule.OnUpdate() (at Assets/MotionFramework/Scripts/Runtime/Module/Module.Resource/ResourceManager.cs:96) MotionFramework.MotionEngine:Update() (at Assets/MotionFramework/Scripts/Runtime/Engine/Core/MotionEngine.cs:90) GameLauncher:Update() (at Assets/GameScript/Runtime/GameLauncher.cs:51)

看代码 是 走到了 BundleFileLoader 的 保险机制。。。

MidiSmallYue commented 2 years ago

frame 改大点 就行了

MidiSmallYue commented 2 years ago

每个 资源需要的 frame 可能不一样,也不知道 最大的 资源 需要的 frame 为多少,手动改 感觉 不太 好呀。。

gmhevinci commented 2 years ago

应该是同步加载了本地不存在的资源。我修改下例子

gmhevinci commented 2 years ago

DEMO已经提交。再使用同步加载接口的时候,需要保证资源已经在本地或者在游戏开始的时候,更新下载好。

MidiSmallYue commented 2 years ago

DEMO已经提交。再使用同步加载接口的时候,需要保证资源已经在本地或者在游戏开始的时候,更新下载好。

好的,多谢