A quick question about player prefs

How do I check whether player prefs equals something… like i have a string pref and i want to see whether it equals the same as a variable in my code. How do i do it?

Thanks

If you saved for example a name with:

PlayerPrefs.SetString("Name", "Thornekey");

You can get the string by using:

PlayerPrefs.GetString("Name");

To compare it:

string name = "Nick";

PlayerPrefs.SetString("Name", "Thornekey");

if(name == PlayerPrefs.GetString("Name"))
{
  //it's false
}