Засовываем:
- Код: Выделить всё
public static void SetSomeFlag(bool boobs)
{
int i_option;
if (boobs == true)
i_option = 1;
else
i_option = 0;
PlayerPrefs.SetInt("SomeFlag", i_option);
}
Получаем:
- Код: Выделить всё
public static bool GetSomeFlag()
{
bool boobs = false;
if (PlayerPrefs.HasKey("SomeFlag"))
{
int i_option = PlayerPrefs.GetInt("SomeFlag");
if (i_option == 0)
boobs = false;
else
boobs = true;
return boobs;
}
return boobs;
}