Reloading a scene as a trial in Unity #156
-
Hello together! Thank you for making something like the UXF possible! Right now I am working on an experiment where the subject has to navigate through a scene and move objects. After a trial I want to reset the whole scene (all objects to their starting positions) and the next trial starts. Do you have an Idea on how to reset the scene without saving every objects position and rotation? Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! Probably the easiest way for you is to reload the scene. When you reload the scene and you want to keep the UXF Session, you can enable "Don't destroy on load new scene" and "Set as main instance" https://github.com/immersivecognition/unity-experiment-framework/wiki/Multi-scene-experiments If you have things like trackers, you will need to make those persist the reload too DontDestroyOnLoad https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html |
Beta Was this translation helpful? Give feedback.
Hey!
Probably the easiest way for you is to reload the scene. When you reload the scene and you want to keep the UXF Session, you can enable "Don't destroy on load new scene" and "Set as main instance"
https://github.com/immersivecognition/unity-experiment-framework/wiki/Multi-scene-experiments
If you have things like trackers, you will need to make those persist the reload too DontDestroyOnLoad
https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html