Got a very simple ICustomBootstrap and cannot figure out how the get the EntityCommandBufferSystem Singletons into the second world: as you can see in the picture: one world has two Singletons, and the other zero. Obviously the call to SystemAPI.GetSingleton() fails in both world as a consequence of that. Stupid mistake on my end or bug in Entities [1.0.0-exp.8]?
public class LoadingWorldBootStrap : ICustomBootstrap
{
public bool Initialize(string defaultWorldName)
{
World.DefaultGameObjectInjectionWorld = new World("My Default World");
var anotherWorld = new World("AnotherWorld");
var systems = DefaultWorldInitialization.GetAllSystems(WorldSystemFilterFlags.Default);
DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups(World.DefaultGameObjectInjectionWorld, systems);
ScriptBehaviourUpdateOrder.AppendWorldToCurrentPlayerLoop(World.DefaultGameObjectInjectionWorld);
DefaultWorldInitialization.AddSystemsToRootLevelSystemGroups(anotherWorld, systems);
ScriptBehaviourUpdateOrder.AppendWorldToCurrentPlayerLoop(anotherWorld);
return true;
}
}