Lets talk about memory...

Hey everyone,

Here is a theoretical situation:

Lets say I have a 2D scene which is an AssetBundle
The scene contains refences to a prefab which is a 2D image (for example lets say 10 MB).
Every time the user dies the image will appear.

What if the user wont die? it wont appear and I don’t want to load that prefab/image to the memory.
BUT because I have a direct reference to the prefab from our scene (the assetbundle) at the moment I load the scene it will automatically loads the prefab as well because I have that direct reference and that’s how Unity works pretty much…

So… what is the solution? do I need to create 2 asset bundles for 1 feature?
One bundle will be the scene and the other bundle will be the image prefab? it just doesn’t make sense…

Maybe in addressable it is fixed?

I will be very glad to hear your thought’s, Thank you!
Oren.

bump??

Found the solution thanks guys! :smile:

What did you come up with? Did you use an AssetReferenceGameObject?