Hey there.
So, here's the setup:
In the first Scene/Level 1 i created an empty GameObject with an FSM, lets call it "Manager".
1. The FSM hat so far only the START-State with only one action: "Dont Destroy on Load"
2. In the Scene is a Trigger-Cube which loads Scene 2/Level 2
3. In Level 2 there is also a Trigger-Cube which loads Scene 1/ Level One again.
So, when i start the game this happens in the Hierarchy:
- first i am in Level 1 moving to the Trigger, it loads Level 2
-> the Manager isn't destroyed! It's there in Level 2.
- now, when i move to the Trigger-Cube of Level 2 which will load Level 1 again this happens: I have two Manager-Gameobjects!
If I go again to the Trigger-Cube which will load Level 2, i have still these two Objects, back to Level 1, there are three "Manager"-Objects now and so on.
How could i prevent that? I just want to have only ONE Manager there.