Search Unity

Duplicated World Systems not appearing inside Debugger

Discussion in 'Entity Component System' started by Knightmore, Jun 1, 2019.

  1. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Hello,
    trying to duplicate a world with more advanced code and even the simplest like this one

    Code (CSharp):
    1. DefaultWorldInitialization.Initialize("World 1", editorWorld: false);
    2. World w2 = new World("World 2");
    3. foreach (var system in World.Active.Systems)
    4. {
    5.   w2.CreateSystem(system.GetType());
    6. }
    all systems always only appear in one world.



    Using ScriptBehaviourUpdateOrder.UpdatePlayerLoop typically only shows the system in the world last called with it.

    World.Active.Systems.Count() and the same for w2 are showing, that they have systems (World.Active has 26 and w2 has somehow 33).

    Is there any chance to get both worlds active inside the entity debugger?
     
    5argon likes this.
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Zoey_O likes this.
  3. Knightmore

    Knightmore

    Joined:
    May 11, 2012
    Posts:
    227
    Thanks for your answer.
    Unfortunately those docs didn't help as it seems that there are some quirks to get all the systems of the default world to run in more than one world at the same time.

    Still I got it to work for my testing environment together with a customized ConvertToEntity script.

    upload_2019-6-5_20-22-18.png