Previously I would often reload the current scene to restart whatever happens in that scene, is there any way to do something similar for the active world? I can do
World.Active.Dispose();
but I havent found a way to reload the world as it happens on startup?
There is a DisposeAllWorlds method, but worlds are designed to have a game scope so I don’t think I would do that even if you can.
What I do is the systems that need it implement an interface with OnActivate(Scope scope)/OnDeactivate(Scope scope) methods. I use that to manage state of various scopes which could be a scene unload/load or something else.
You could also tag entities with a scope component of some type to go along with that, run a job to destroy all entities of the scope in question.