Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Avascar on November 24, 2012, 06:22:44 AM
-
Hey all, I would like to know if there's something to do about resetting a scene (putting game objects back, some variables, undoing scripts, ect).
Thanks
-
Hey,
you can just reload the level. It's the only way I know of to actually reset all the physics etc to their original state. I attached an action I always use. It's pretty much exactly the loadLevel action, it just saves you the time to determine the current level.
best,
kiriri
-
Wait so I just do LoadLevel?
-
why yes, I think under the hub it does notice that some (in this case all) prefabs are in the "new" (same) scene too, so it won't empty your entire cache and actually reload your scene completely (I think, well at least it's quite fast).
what else did you expect? The scene stores all the global transforms and if you manipulate attributes on a gameObject in a scene, you'll always be working on instances.
-
Sorry about that, but thanks for helping me. It's 4:24 AM here 8)
-
sure, I didn't want to put you off, it was a fair question, I just happened to have looked it up already myself :P
I do recommend the reload level action though. It will save you the time to get the name or index of your current scene.