Previous: , Up: Serialization   [Contents][Index]


15.5 Unique Preference Serializer

Component: UniquePreferenceSerializer

Unique Preference Serializer allows you to save & load one object field in your game. This is for *unique* fields. So, for example, if you try to save the enemy’s health, then when you load the game *every* enemy with that prefab will load the health of the last one to save with that ’Unique Identifier’. But, if you save the Player’s health, that is fine since there is only one local player at a time so there are no duplicates to cause errors. This component saves to Player Prefs and therefore works on all platforms that support MultiGame.

Available Messages

Message on UniquePreferenceSerializer: Save ()

Saves the field to PlayerPrefs with the Unique Identifier, which is used internally to identify the field data between sessions

Message on UniquePreferenceSerializer: Load ()

Loads the field from PlayerPrefs and populates it’s value with the one previously saved

Available Messages

Message on UniquePreferenceSerializer: Save ()

Saves the field to PlayerPrefs with the Unique Identifier, which is used internally to identify the field data between sessions

Message on UniquePreferenceSerializer: Load ()

Loads the field from PlayerPrefs and populates it’s value with the one previously saved