Wednesday, August 21, 2019

delete player prefs in unity

you only need to add in scene prefab gameobject

    #if UNITY_EDITOR
void Update ()
    {
        if(Input.GetKeyDown(KeyCode.Delete))   
        {
            Debug.Log("Delete all player prefs.");
            PlayerPrefs.DeleteAll();
        }
    }
    #endif

No comments:

Post a Comment