I was trying to remove everything except a few assets in the scene. For example, in this code, when I try to add a box and sphere into scene, then put box into KeepAssets and then move sphere into the container. I then tried to use method dispose(), but this actually disposed my box also. But I only want to dispose the sphere.
I just read the documentation. The difference between container.moveAllFromScene and container.removeAllFromScene is, the first one moves all stuffs from scene into the container, while the later will remove the stuffs that is already in the container from the scene. I noticed the later should not take any argument. Since you put sphere mesh deliberately into the container, so it think that would delete the stuffs you deliberately put in. But I was wondering how to remove everything except for the stuffs I want to keep in the cleanest way? I may have many meshes, textures, etc inside the scene, and can I avoid loop through all of meshes, bones, textures, etc? Especially if I want to import model from outside, this can get hectic.