Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Deterministic entities serialization

Discussion in 'Physics for ECS' started by lijianfeng, Nov 7, 2019.

  1. lijianfeng


    Sep 8, 2015
    If I serilize all the rigidbody,and remove all of them from world.then I deserillize them and put them back to world.Does it guarantee deterministic result ? or I need to restep game from start? o_O I plan to use this way to save game state and reappear my game.
  2. Rory_Havok


    Jun 25, 2018
    If BuildPhysicsWorld sees the entities in the same order as it originally did, then the simulation results will be the same, becuase the PhysicsWorld will be the same. So I think the question is whether your process of serialize->remove->deserailize could interfere with the entity order.
    lijianfeng likes this.