playMaker

Author Topic: game options between scenes without using playerprefs?  (Read 1779 times)

derkoi

  • Full Member
  • ***
  • Posts: 187
game options between scenes without using playerprefs?
« on: November 15, 2012, 08:25:34 AM »
On the main menu of a racing game I'm working on, I'd like the player to be able to choose the type of race, amount of laps and other parameters for the race. I don't want to use playerprefs if I can avoid it, so I thought of this idea.

Start scene and spawn an empty game object prefab in the menu scene with an FSM on it called "_RaceSettings" that stores all the users selections before the next scene is loaded, use don't destroy on load to make _RaceSettings carry across to the next scene and have an FSM load the data from _RaceSettings at the start of the scene.

Upon quitting back to the menu scene, the menu would check that a _RaceSettings object is present and not spawn a new one if it is present.

Does that sound like it would work?

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: game options between scenes without using playerprefs?
« Reply #1 on: November 15, 2012, 02:36:43 PM »
Hi,

 yes, that would work. PlayerPrefs is really about storing data so that it persists when the user quits your application.

Bye,

Jean