Code Monkey home page Code Monkey logo

Comments (9)

tangzx avatar tangzx commented on May 26, 2024

没遇到过,AsyncUploadManager 是你项目的代码吧

from absystem.

bianchengxiaobei avatar bianchengxiaobei commented on May 26, 2024

好像有时候极低的概率是可以加载出来的,但是大部分是有错的。错的分两种:
有时候出现这个错误:
Assertion failed: Cancelling DisplayDialog because it was run from a thread that is not the main thread: Opening file failed Opening file archive:/CAB-020b3b51eeb82f5f87f9c0f95e001576/CAB-020b3b51eeb82f5f87f9c0f95e001576.resS: 操作成功完成。
Closing file : 操作成功完成。
: archive:/CAB-020b3b51eeb82f5f87f9c0f95e001576/CAB-020b3b51eeb82f5f87f9c0f95e001576.resS
Could not open file archive:/CAB-020b3b51eeb82f5f87f9c0f95e001576/CAB-020b3b51eeb82f5f87f9c0f95e001576.resS for read
有时候又出现这个错误:
AsyncUploadManager: Failed to close file archive:/CAB-020b3b51eeb82f5f87f9c0f95e001576/CAB-020b3b51eeb82f5f87f9c0f95e001576.resS. Ensure all async operations are complete before unloading bundles.
UnityEngine.AssetBundle:Unload(Boolean)
Tangzx.ABSystem.AssetBundleInfo:UnloadBundle() (at Assets/ABSystem/Scripts/AssetBundle/AssetBundleInfo.cs:292)
Tangzx.ABSystem.AssetBundleInfo:get_mainObject() (at Assets/ABSystem/Scripts/AssetBundle/AssetBundleInfo.cs:279)
CaomaoFramework.c__AnonStorey0:<>m__0(AssetBundleInfo) (at Assets/Scripts/Framework/UIManager/UIBase.cs:128)
AssetBundleLoader:FireEvent() (at Assets/ABSystem/Scripts/AssetBundle/AssetBundleLoader.cs:106)
AssetBundleLoader:Complete() (at Assets/ABSystem/Scripts/AssetBundle/AssetBundleLoader.cs:90)
MobileAssetBundleLoader:Complete() (at Assets/ABSystem/Scripts/AssetBundle/AssetBundleLoader.cs:285)
c__Iterator0:MoveNext() (at Assets/ABSystem/Scripts/AssetBundle/AssetBundleLoader.cs:217)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

是不是异步加载卸载造成的

from absystem.

bianchengxiaobei avatar bianchengxiaobei commented on May 26, 2024

如果我把:
void UnloadBundle()
{
if (bundle != null)
{
if (WWWResourceManager.enableLog)
Debug.Log("Unload : " + data.compositeType + " >> " + data.debugName);

            bundle.Unload(false);
        }
        bundle = null;
    }

的bundle.Unload(false)注释了就不会有错误

from absystem.

tangzx avatar tangzx commented on May 26, 2024

这个问题倒是没遇见过。Ensure all async operations are complete before unloading bundles. 重点可能在这,你有没有改ABSystem源码,或者多个ab系统共存了,导致一边在加载一边在卸载?

from absystem.

bianchengxiaobei avatar bianchengxiaobei commented on May 26, 2024

能加个qq聊下吗,好像只有这个资源有问题。其他资源就没问题,很奇怪

from absystem.

bianchengxiaobei avatar bianchengxiaobei commented on May 26, 2024

大佬,在吗?又有问题,就是场景加载后,加载的UI就会变形。是场景加载时会卸载AB吗,我已经将UI设置为DontDestory了,为啥还会卸载?

from absystem.

li5414 avatar li5414 commented on May 26, 2024

这是新版unity的问题,主要是加载ab里面的纹理,然后立即unload(false),延迟unload就行了

from absystem.

fingerx avatar fingerx commented on May 26, 2024

发现新版本Unity 有同样的问题,总是概率性出现这个错误

from absystem.

takaaptech avatar takaaptech commented on May 26, 2024

I think it is relate
https://forum.unity.com/threads/opening-file-failed-opening-file-archive-cab-ca6e2cdc278a53641b19581a975bffc5-cab-ca6e2cdc278a53641.488402/

from absystem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.