-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Documentation says: It has scene.destroy(); but it's a little inconsistent not to have app.destroyScene(scene) or even better that and app.removeAndDestroyScene(scene).
Because if you don't do that, it leads to many internal questions/unknowns.
Do you have to remove the scene via app.removeScene and then scene.destroy later ? [This is syntaxtually not very beautiful.]
And what happen when you call scene.destroy without first calling app.removeScene ?
Does it holds a null bug waiting to happen then since it still technically holds a scene that is no longer there ?
All these could be eliminated if app.destroyScene(scene) and app.removeAndDestroyScene(scene) is implemented.
Please correct me if I am wrong thank you because I am learning and trying to make everything consistent in my mind :-)
Another case in point, you have:
scene.addResource(material, "Material");
scene.findResource("static_bounce", "Material");
scene.destroyResource("static_bounce", "Material"); //or material.destroy(); if you already have access to the material directly.
So for consistency sake, you have app.addScene, app.findScene but scene.destroy() but no app.destroyScene() is consistently wise a little strange I think.