Hi Everyone, there’s a spritesheet that’s resident in memory for our whole game. I’m looking at how we can unload it completely and free up its texture memory when it’s not needed. The way we’re loading it is via an AssetBundleRequest:
var request = ab.LoadAssetWithSubAssetsAsync<T>(path);
yield return request;
var t = request.allAssets as T[];
callback(t);
‘t’ is now a Sprite[ ] that’s passed back up into game code for storage and lookups.
How would one forcibly unload the whole spritesheet in this case? By the time we’re done with the spritesheet, the AssetBundleRequest is long gone and we only have references to the individual sprites at this point. Also, the bundles in question contain assets that are used for other purposes, and those shouldn’t be unloaded when it’s time to unload this spritesheet.
Thanks in advance,
Jeff