Coder Social home page Coder Social logo

Comments (11)

kaznog avatar kaznog commented on August 16, 2024

When Model.CreateAsset is not AssetInfo,
Because m_DependentAssets.Last () will be null,
It gets NullReferenceException when trying to get fileSize.

If Model.CreateAsset may return null,
A null check is required.

from assetbundles-browser.

kaznog avatar kaznog commented on August 16, 2024

I can not confirm it because I never encountered a problem.
You may be able to solve the problem by making the following modifications.

ABModelBundleInfo.cs

353:                        AssetInfo addAssetInfo = Model.CreateAsset(assetName, folderAsset);
354:                        if (addAssetInfo != Null)
355:                        {
356:                            m_DependentAssets.Add(addAssetInfo);
357:                            m_TotalSize += m_DependentAssets.Last().FileSize;
358:                        }

from assetbundles-browser.

Insanto avatar Insanto commented on August 16, 2024

Oh, I already fixed it for myself but there was a LOT that wasn't foolproofed, not just one.

from assetbundles-browser.

kaznog avatar kaznog commented on August 16, 2024

I think that it is good to be able to fix it freely.

from assetbundles-browser.

kaznog avatar kaznog commented on August 16, 2024

I would be happy if you tell me the incomplete part.

from assetbundles-browser.

Insanto avatar Insanto commented on August 16, 2024

There were about 20+ things i had to change to make it work properly, I can zip it up and you can diff it yourself if you like.

from assetbundles-browser.

Insanto avatar Insanto commented on August 16, 2024

AssetBundleBrowser.zip

from assetbundles-browser.

alffanclub avatar alffanclub commented on August 16, 2024

Thanks for letting us know you're having a problem @Insanto, and especially for providing a solution that solved it for you! I'll work on integrating your fix and should have it up in the master branch soon.

from assetbundles-browser.

alffanclub avatar alffanclub commented on August 16, 2024

@Insanto, the null checking is in master now. If you run into any more null issues, please let me know. Also, thanks @kaznog for chiming in with helpful ideas.

from assetbundles-browser.

Insanto avatar Insanto commented on August 16, 2024

To replicate set up a faulty asset bundle (scene, scripts and assets all marked for the bundle) that revealed a lot of things that needed fixing.

from assetbundles-browser.

alffanclub avatar alffanclub commented on August 16, 2024

Thanks @Insanto. I'll work on creating some more fail states to catch these edge cases. If you run into any more issues, please don't hesitate to open another ticket.

from assetbundles-browser.

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.