Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2022.2 beta is now available for testing. To find out what's new, have a look at our 2022.2 feature highlights.
    Dismiss Notice
  3. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Submit bug reports tagged with #Beta2022Win_Unity when you encounter unknown issues while testing the 2022.2 betas for a chance to win a year of Unity Pro. For more information, have a look at our Beta Sweepstakes Announcement.

Deterministic entities serialization

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

  1. lijianfeng

    lijianfeng

    Joined:
    Sep 8, 2015
    Posts:
    54
    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

    Rory_Havok

    Joined:
    Jun 25, 2018
    Posts:
    70
    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.
unityunity