Hello, I have a couple of questions about scene loading / unloading.
If I have a non-addressable scene (part of built-in data), and I call Addressables.UnloadSceneAsync on it, will the assets used by this scene get unloaded? Judging by the documentation on SceneManager.UnloadSceneAsync (which I believe is used behind the scenes), the answer is no, and the only way to clear memory in this case is to call Resources.UnloadUnusedAssets. Is this correct?
Say I have a bundle loaded with three assets, A, B and C. I hold on to a reference to A, but not B and C. I understand that until I let go of the reference of A, the whole bundle will be kept in memory - unless I call Resources.UnloadUnusedAssets, in which case B and C will be unloaded.
But what happens, if, using UnloadUnusedAssets, I unload part of the bundle, and then later I try to load the same bundle again? Is the whole bundle going to be loaded again, meaning that I’ll now have a leaked “A” asset, a leftover from a previous bundle load? And if this is the case, do we have to make sure to let go of all references to all bundles, in case we call Resources.UnloadUnusedAssets to clean up after a scene which is not itself bundled?
EDIT: OK, so after a bit of testing it seems that misunderstood how UnloadUnusedAssets would affect the bundles themselves - as in, calling UnloadUnusedAssets would not unload the bundles themselves, but it would unload the assets that are in the bundles, but currently not referenced. This kind of makes sense.
My question, then, is: is there a quick and easy way to keep already loaded bundles in memory, with all their assets, while resources.UnloadUnusedAssets is called?