I’m trying to package an html5 game, but I’ve realized that the game file is currently way too huge (3.2gb ) to play in browsers. To keep the initial filesize small, is it possible to have the user download the assets from a server at runtime, so that the upfront download is small enough to play on the browser?
From my research, it seems like it is possible, but the solutions are either really outdated and/or for c++ projects instead of blueprints.
Currently 80% of the build is just high quality 3d models that won’t be loaded in until the user selects them basically, so loading them at runtime would help a lot.
Thanks!
Do you know if native PC/Android builds have this kind of mechanism to download assets from the web on demand? If so, my understanding is that that mechanism would be then much the same for html5 builds as well.
If there is no such mechanism in UE4, then if there’s a way to load assets from separate pak files on disk, that method could be adapted to provide a download on the fly architecture for html5 builds, but it may be the case that this will need quite a bit of knowledge of Unreal file packaging and Emscripten file system to be able to pull off. Emscripten has two mechanisms, emscripten_async_wget ( emscripten.h — Emscripten 3.1.39-git (dev) documentation ), and Fetch API ( Fetch API — Emscripten 3.1.39-git (dev) documentation ) to download assets from the web, those would need some kind of mechanism to be hooked up to Unreal’s pak system in user C/C++ code.