The PlayerPrefs
It has something similar or it can even use boolean variable.
example:
PlayerPrefs.GetInt() // e para inteiros
The PlayerPrefs
It has something similar or it can even use boolean variable.
example:
PlayerPrefs.GetInt() // e para inteiros
According to the documentation , it is only possible to save values of type float, int and string.
Since it is not possible to store booleans, you can store 0 or 1 and convert them, see the example below:
using UnityEngine;
using System.Collections;
public static class CustomPlayerPref
{
public static bool GetBool (string key)
{
return PlayerPrefs.GetInt(key) == 1;
}
public static void SetBool (string key, bool state)
{
PlayerPrefs.SetInt (key, state ? 1 : 0);
}
}
Unity native face does not, but if you access this link
And copy the script JS and paste in some folder in the project, to use with bool sim, same as playerPrefs, but there you only write
playerPrefsX.getBool or .setBool,
At the time I found one that saved Colors, but I do not find it now to post here hahaha, I hope it helps!