В инспекторе не показываются перемменые
using UnityEngine;
using UnityEngine.UI;
public class gamescript : MonoBehaviour
{
[SerializeField] private static int money;
[SerializeField] private static int upgrades;
public void start()
{
money=PlayerPrefs.GetInt("money");
upgrades=PlayerPrefs.GetInt("upgrades");
}
public void click()
{
money += upgrades;
PlayerPrefs.SetInt("money", money);
}
public void upgrade()
{
while(money == 15)
{
upgrades++;
}
PlayerPrefs.SetInt("upgrades", upgrades);
}
public void Save()
{
PlayerPrefs.SetInt("money", money);
PlayerPrefs.SetInt("upgrades", upgrades);
}
}