I’ve just lately arrange a small helper class to load and unload addressables, it incorporates the next strategies for that objective: Gist-Hyperlink.
Now I’ve examined to load one thing and unload it similarly, I’ve proofed this with the reminiscence module of the profiler and noticed the reminiscence go up when loading and go down the identical quantity when unloading (in a construct).
However now I’ve coupled this technique with an object pool, i.e. as quickly as a sport object is loaded from an addressable I create a pool for it. The difficulty now could be that I load the useful resource, I create a pool (i.e. I create sport objects by way of the conventional instantiate utilizing the outcome returned by the operation deal with), then when unloading I first delete the pool (f.e. destroying the instantiated sport objects) and lastly launch the operation deal with liable for the useful resource. And this appears to sort of work, however the reminiscence does not go down the identical quantity whereas unloading as once I loaded it, and I do not know tips on how to debug this side. I attempted with the addressable occasion view however I do not know what to do with its outcomes. I haven’t got a screenshot at hand proper now, however what I noticed was that the useful resource was loaded (I used to be in a position to see the precise prefab), nevertheless it was the kid of a dependency, and once I unloaded the prefab, it disappeared from the occasion viewer, however the dependency remained with a ref depend of 1, which is perhaps the difficulty of the remaining quantity of reminiscence?
My query due to this fact is, how can I accurately decide if the loading and unloading of addressables is working (and why if not) when not counting on the instantiate async methodology utilizing the profiler and occasion viewer?