i’d like to make a function which dispose all the materials and texture without any mesh associated to minimize the size of the babylon file when i save the project.
I whipped up a playground that demonstrates a way to do this. It would be nice to create a helper function. The logic wasn’t too hard.
Note: Babylon creates some textures that aren’t attached to meshes or materials but are used as part of the PBR/environment stuff. I think a helper function should know how to exclude those from the search.