Description
The DeletePendingObjects
method is used to immediately delete objects that are marked for deletion within the current SceneWorld
. Normally, objects are deleted at the end of each frame, but calling this method will force the deletion to occur immediately. This can be useful in scenarios where you need to ensure that all pending deletions are processed before proceeding with further operations.
Usage
To use the DeletePendingObjects
method, simply call it on an instance of SceneWorld
when you need to ensure that all objects marked for deletion are removed immediately. This method does not take any parameters and does not return a value.
Example
// Example of using DeletePendingObjects
SceneWorld mySceneWorld = new SceneWorld();
// Perform operations that mark objects for deletion
// ...
// Immediately delete all pending objects
mySceneWorld.DeletePendingObjects();
// Continue with other operations knowing that all pending deletions are processed
// ...