Settings is a dummy class that can be extended in any way to store user information. Every time the user minimizes app, this class is serialized and saved in JSON format. It is restored during next game session.

// store the name of the selected character
Settings.selectedCharacter = this.entity().name();

// get the stored character name from Settings
let charName = Settings.selectedCharacter;

Variables set in the Settings class can be accessed and changed from within Xcode when you export to iOS. This can be useful for custom SDK integration, A/B testing, and more. To access the Settings class in ObjectiveC Xcode, import PTPSettingsController and use getSettingsValue and setSettingsValue. For example, setSettingsValue(“myVariable, “‘456′”) or setSettingsValue(“myVariable”, “{objectid: 123, myString:’my string here’}”).

Did you find this page useful?

Please give it a rating:

Please provide some feedback!

This is very helpful to us.

Tell us how we can improve this post?