Search Unity

"ArgumentException: MoveEntitiesFrom is not supported with managed arrays"

Discussion in 'Entity Component System' started by 5argon, Jun 26, 2018.

  1. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    Anyone used entityManager.MoveEntitiesFrom ? I just create a new world, create a new EntityManager in that world, then call MoveEntitiesFrom on it to copy all of entities in the default world to new world.


    Code (CSharp):
    1.         World saveWorld = new World(nameof(saveWorld));
    2.         var emSave = saveWorld.CreateManager<EntityManager>();
    3.         emSave.MoveEntitiesFrom(EntityManager);
    It prints "ArgumentException: MoveEntitiesFrom is not supported with managed arrays".

    Which managed arrays? It's not like I am moving things to any array but to a new empty world. Of course I have a lot of entities in my current world that might be the cause of this problem but how to debug this?

    I have searched all of my IComponentData + ISharedComponentData and none of them contains a managed array as their member. (It is not allowed anyways?)
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    The world can't contain any hybrid Component derived components
     
    T-Zee and 5argon like this.