Disposing All GLTF Memory
Currently I am using a WebGL build to run this. But when I import a model and then later want to delete it completely out, it still hangs around in memory and memory is in short supply for WebGL. I seen that there is an AssetCache.Dispose() function in the AssetCache.cs but calling this after destroying the model doesn't do anything to the memory at all. I wrote my own code in the function to Destroy everything Unity related hanging around those classes it is better but there is still memory floating around. And after I import a second model I get a "WebGL out of memory" error. Raising the memory allocation amount for WebGL isn't an option as it is as high as it can currently go (without crashing) so I guess I am looking for direction on what to do to dispose close to ALL memory out.
Please note that the GLTF model I am currently using is a big model with about 10 textures. Obviously our art team will have to change their best practices when it comes to art creation so it is heavily optimized for GLTF but this model serves as a good test model for testing the limits of WebGL.
Thanks!
I was able to get around it in a hacky way by changing unity scenes. Unity WebGL runs a garbage collect only on scene change in WebGL (I read that somewhere on Unity's site)