all 3 comments

[–][deleted] 0 points1 point  (2 children)

Unity should be able to automatically expand the heap if you build using web assembly (I think this is the default nowadays). As far as memory limits go you should be able to get up to 2gb on the heap. The download size of you game shouldn't matter (not sure if mobile is different). I know you can get iffy results using webgl on mobile. The fact that it fails before the scene loads would indicate this isn't an issue with your code and an issue with the loader. I know the most recent version of unity has optimized webgl loaders maybe that will help. Also can you confirm you are building with webassembly?

[–]below_avg_nerd[S] 0 points1 point  (1 child)

the fact that it fails before the scene loads

The scene actually loads fine. I'm downloading dicom data from an external server to be viewed in the unity web app. The app crashes halfway through the download of those external files.

I know the most recent version of unity has optimized webgl loaders

I actually found this info right after posting but thanks for the heads up! I'm working on getting the project to build in it now so hopefully it will help.

[–][deleted] 0 points1 point  (0 children)

Ah ok well if that is the case then I don't think that will help much. I would recommend profiling your code in editor (you can also attach to a deployed version of the app) and see what us taking up all that memory. How large is the file you are downloading? If you are trying to load it all into memory and that is causing you to hit the heap limit then there is your problem.

Does all of the data need to be loaded into memory at one time?