If the game has registered a PlayerPrefs then some code will happen

Hi Guys,

I need some help writing a script which will execute some code if the game has registered some data being saved in a PlayerPrefs.

So if some data has been saved by PlayerPrefs (such as camera location) then the color of some text will change from gray to white otherwise it will stay gray.

The code will be for a ‘continue’ button that will only be available (be white font) when the player has actually made some progress.

That progress will be saved in a PlayerPrefs class.

Thanks and Regards,
Paddy

You can use HasKey to check if a value has been set: Unity - Scripting API: PlayerPrefs.HasKey