Answer the question
In order to leave comments, you need to log in
How to subtract a number from PlayerPrefs?
Hello! Is it possible to subtract a number from PlayerPrefs?
in my code, by clicking on the button, the number should be subtracted and then loaded
, but the number does not change
public void Chest(){
if(money >= 100){
money-=100;
PlayerPrefs.SetInt("Money_S", money);
StartCoroutine(Wait2());
}
else {
NotMoney.SetActive(true);
StartCoroutine(Wait4());
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question