Recreating scene objects at next level

Hello i have a simple 2d scene with a block that rotates arround self over time.Whenever the player press the mouse click i instantiate another block make it child of the first block save the euler angles of the parent and move the child 2 units away from the parent so the child rotates arround parent.I do this some more times and then i move to the next scene.All the child objects have colliders and if they collide i destroy them.On the next scene i have a script that loads the euler angles that the player clicked and while the parent block rotates with the same speed i want to recreate the objects exactly at the same way.The script that rotates the parent is this.

  float[] floats;                            //the actual ange.z floats stored in the first scene
  angle = transform.eulerAngles ;
   void Update() {
    angle.z += Time.deltaTime * 80;
    if (angle.z >= 360)
    {
        round++;                   //fire each child every round (every one full rotation)
        attackedThisRound = false;
        angle.z = 0;
    }
    transform.eulerAngles = angle;
    if (round < floats.Length && !attackedThisRound && angle.z >= floats[round] )
    {
        InstantiateChild();
        attackedThisRound = true;
        Debug.Log("Desired :" + floats[round] + " Actual:" + transform.eulerAngles.z);
    }
 }

Now What is happening.Lets say i fire a block when the Parent’s ange.z is at 45.565f.
At the next level it will be fired between 44.5-47.5f and the child may land on another child and destroyed.Now this when tested in different pcs with different frame rates will have a lot worse results,on mobile even worse.
These are some logs from the unity editor.Testing on my devices i had ~5f max error.
Desired :209.7344 Actual:209.5964
Desired :253.9744 Actual:254.9251
Desired :291.1291 Actual:291.6958
Desired :326.7104 Actual:326.6832
Desired :1.343259 Actual:1.261122
Desired :142.5259 Actual:143.0578
Any ideas?

I’m not sure why you’re changing the scene if you want things to keep moving, it’s like you’re setting up a hard problem to solve that could be avoided.

Anyway, you’re doing physic stuff in the Update function, that’s why you get different results with different framerates. Use FixedUpdate instead. But note that Unity’s physic simulation is NOT deterministic, it’s not ensured that the same objects in the same setup will move always the same way. Ofcourse they follow the same laws, but a lot of things can alter the result.

Also, have you tried setting anything you want to keep from one scene as DontDestroyOnLoad? Unity will keep those objects in the scene when loading a new one, but I’m not sure how the current physic state is handled (I guess it’s not altered, but physics are complicated, and loading a new scene messes with time and framerate for a few milliseconds).