This is my current code, it only work into unity, when i test it in an Android Device it don't save the variable
public class Click : MonoBehaviour{
public UnityEngine.UI.Text proiettiliTotali;
public UnityEngine.UI.Text bpc;
public float proiettili = 0.00f;
void OnEnable(){
proiettili = PlayerPrefs.GetFloat("Player Score");
}
// Update is called once per frame
void Update () {
proiettiliTotali.text = ConvertiroreProiettili.Instance.GetCurrencyInString(proiettili, false, false);
bpc.text = ConvertiroreProiettili.Instance.GetCurrencyInString (proiettiliOgniClick, false, true);
}
public void Clicked () {
proiettili += proiettiliOgniClick;
}
void OnDisable(){
PlayerPrefs.SetFloat("Player Score", proiettili);
PlayerPrefs.Save ();
Debug.Log (proiettili);
}