Hi,
I'm currently creating an app where a high number of objects are created and removed during the usage.
Now I want to make sure that config changes don't create weird scenarios.
The objects that I create are dependant on the lifetime of a real world object. When the real world object isn't present anymore, the on screen object also has to be removed.
Now this works perfectly fine during the usage of the app. However, when the real world object is present and a config change occurs, the objects stay on the screen and don't get deleted. The problem lays in that the world gets deleted before the app has the chance to remove the objects.
The error i get is:
ERROR: Can't remove object #1, because it doesn't belong to this World!
TLDR: How can I delete individual objects independent of the world they are in, instead of having to call world.removeObject();