I have got 2 scenes in a unity project and want to play simulation of both the scenes in parallel. Has anyone tried this? Thanks!
\$\begingroup\$
\$\endgroup\$
2
-
\$\begingroup\$ answers.unity.com/questions/8148/… \$\endgroup\$– virtousoCommented Oct 2, 2019 at 8:45
-
\$\begingroup\$ This is the default behaviour when you load two scenes, no? How have you tried implementing this so far, and where have you gotten stuck or observed unwanted behaviour? \$\endgroup\$– DMGregory ♦Commented Oct 2, 2019 at 9:54
Add a comment
|
1 Answer
\$\begingroup\$
\$\endgroup\$
You can load multiple scenes additively with
SceneManager.LoadScene(scene, LoadSceneMode.Additive);
The result will be that the objects of both scenes exist in the same 3d space. That means the objects from the two scenes can potentially collide and interact with each other. If you don't want that, then there are two strategies you can use to avoid this:
- Use layers to isolate the physics and rendering of the two scenes.
- Have the content of the two scenes far away from each other in 3d space.