SimpleBundle (Optimization and Fix for Build Time)



  • 正式なコメント

    Thank you for your fantastic add-on!

  • FFF1969

    The build time for Sample project using SimpleBundle from beginning to the very end.

    Only 3.5mins. The original build took 40mins on my machine.

    This is the output build folders,  Original vs SimpleBundle:

    RMU generate several files/folder for each tile. It will create lots of small files and Unity Addressable Assets (AA) want to resolve dependencies in them which is time-consuming. Just use AssetBundle, it is good enough for RMU in most scenarios.

  • FFF1969

    To answer the question from Twitter regarding security concerns: (sorry, I don't have a Twitter account but someone in Discord told me there are people ask questions on Twitter)

    This patch is very simple, which is why it's called 'SimpleBundle'.

    It uses AssetBundle (the traditional way to load assets in Unity), instead of the Addressable Asset (AA).

    In RMU, the AA is simply used for path mapping. If you want to load an asset, it helps you convert the path from something like '01/battlebacks1_fort_001.png' to the full path like 'Assets\RPGMaker\Storage\Images\Background\Battle\01\battlebacks1_fort_001.png'.

    But AA doesn't handle 20k+ files well in this scenario. There might be some setting tweaks that could solve the performance issues in aa, but I don't know because I don't like this package at all – it's too complex to set up and use.

    SimpleBundle stores this mapping data in a ScriptableObject (SimpleBundleData) and puts it in an AssetBundle (simplebundle.unity3d). Then, it packs all data separately into different AssetBundle files, which is good for patching or future updates for each game.

    Before loading, the mapping is loaded first, and then all AssetBundles are loaded. The Load.LoadAssetSync queries the path and bundle, then loads the file.

    Even in RMU, it uses AA.LoadAssetAsync, which is not truly asynchronous loading because the code waits for it to finish before returning. Basically, it's still synchronous loading. There's no performance impact in SimpleBundle.

    Feel free to ask questions here and I'm happy to answer them.

    And if you already built your data before using SimpleBundle, the data created by AA is still there and it will be copied to your build. You need to delete them first, from 'Library\com.unity.addressables\aa' folder.

    I guess it could be slower on machine without SSD, there are still too many small files to pack. An SSD will help performance for game development by Unity and RMU a lot.

    === Translated by ChatGPT ===


    Unityでアセットをロードする伝統的な方法であるAssetBundleを使用し、Addressable Asset(AA)ではありません。


    しかし、このシナリオではAAは20k以上のファイルをうまく扱うことができません。AAのパフォーマンス問題を解決できる設定の調整があるかもしれませんが、私はそのパッケージが一切好きではないのでわかりません - 設定や使用が複雑すぎます。







  • 紫苑もみじ



    コードを読み進めるうちにまた質問をするかもしれませんが、現時点で抱えていた疑問は解けました。 本当にありがとうございます。


    === Translated by ChatGPT ===

    I might be the Twitter user you mentioned. Thank you very much for the excellent code.

    As a beginner in C# and Unity, having started just about a week ago, I don't fully understand SimpleBundle, but I have a rough understanding thanks to your detailed explanation.

    As I continue to read through the code, I might have more questions in the future, but for now, you have resolved the doubts I had. Thank you so much.

  • hellno 2015

    Tried it out and works a charm! Reduced the export time from 50 mins to 15 mins for me and made the game itself load WAY faster when starting it! Thank you SOOOOO much for this!

  • Figgs Neughton

    God bless you sir.