Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ivam on April 26, 2015, 04:03:51 PM
-
Hello,
iam making a small project involving one scene as a base, with the different adventure levels being each in a seperate scene. I would like functionality where the player can go from the base to another scene, play and collect (gold for example) and return to the base scene at any time, but also being able to return to the adventure level he has been at, keeping it in the state as when he left it. - so things that have been collected remain gone, and things that have been added to the base stay the way they are eventho the player travels between scenes (with load level)
-
Check out the concept of "singletons"- I think there's an action for it around here somewhere and the "don't destroy on load" action- you can also use playerprefs to set var's and when the scene loads check them and turn things on and off based on those-
-
cool, thank you, allready thought ill have to work with var tests, hoped there would be an easy way to get scenes persistent without having to query every object that can be picked up.
-
Hi,
yeah, and I just pushed yesterday a custom action SingletonManager (https://github.com/jeanfabre/PlayMakerCustomActions_U3/blob/master/Assets/PlayMaker%20Custom%20Actions/GameObject/SingletonManager.cs) on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) where it will automatically delete duplicates of your singletons
This is typically on complex projects with many scenes, they all need the manager to work on their own, but when playing from the start, then loading scenes will create duplicates, this action will solve this.
Bye,
Jean