For some reason, Unity is not saving the int value when it is reset. I need help fixing it.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
public static int DELUXE;
public static int multiplier;
public void Start()
{
multiplier = PlayerPrefs.GetInt("multiplier", 1);
DELUXE = PlayerPrefs.GetInt("DELUXE", 0);
}
private void Update()
{
Reset();
}
void Reset()
{
if (Input.GetKeyDown(KeyCode.R))
{
DELUXE = 0;
multiplier = 1;
}
}
}