Questions about Entities.World

This works for me when creating a new world and spawning entities in it. The world only shows up when I call that last part of AppendWorldToCurrentPlayerLoop

var systems = DefaultWorldInitialization.GetAllSystems(WorldSystemFilterFlags.Default);
DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups(myWorld, systems);
ScriptBehaviourUpdateOrder.AppendWorldToCurrentPlayerLoop(myWorld);

I tried to later call ScriptBehaviourUpdateOrder.RemoveWorldFromCurrentPlayerLoop(myWorld); and it does not remove the world from view. That world still renders all the entities. I know I can DestroyEntity in there to destroy them all, but I essentially just want to turn a world off. Is there a way to make that happen?

Second question is is there is a way to specify that a World will be visible or not to a specific camera? Something like adding a world to a render layer or being able to specify per camera which worlds to render.

1 Like

When you say a world shows up when you AppendWorldToCurrentPlayerLoop you mean in the editor, correct? Also, if that is the case, what is not showing up the entity inspector or the systems inspector? My multi-world test project is still halfway between 0.5 and 1.0.

I know in 0.5 custom worlds have issues showing up correctly in the editor, unless they use AppendWorldToCurrentPlayerLoop, which effects debugging manually updated worlds. It sounds like worlds are also not getting removed from the editor correctly.

Will the editor support multi-worlds better in the future?