unity-game-enginetexture2dassetbundle

Dealing with massive amount of user generated images in Unity3D


I need to create a system where we load images into the game. Those images can be uploaded by the users of my app through a dashboard. I download them to the device(persistent data path) and load them from there. The question is, should I load them as AssetBundles(through Addressables) or straight from disk with Texture.LoadImage(bytes).

Keep in mind that I will not be able to apply custom compression for them. I use the same compression for all files, whether it's an asset bundle or not. The problem with asset bundles is the management of them. When you update the unity version + the fact that I need to have unity run on a server and create them every time someone uploads an image to the dashboard.

TL;DR; Is the loading of an image that bad with Texture.LoadImage(bytes) that you should use AssetBUndles even if it involves way more work and problems?


Solution

  • Someone else answered this in a Unity forum.

    The best option you can pick is to use RawImage component, which uses textures not sprites, removing the need to load a sprite from a texture, making it much faster. Case in which asset bundles are not required, simplifying the solution while keeping a decent loading speed.

    Answer here: https://answers.unity.com/questions/1758532/dealing-with-massive-amount-of-user-generated-imag.html