EditorPrefs.DeleteAll();
using UnityEditor; ... public void ClearPlayerPrefs() { EditorPrefs.DeleteAll(); }
using UnityEngine; ... public void ClearPlayerPrefs() { PlayerPrefs.DeleteAll(); }This code example is incorrect as it uses PlayerPrefs instead of EditorPrefs. PlayerPrefs is a class that is used to store and retrieve player preferences in the Unity game engine. Package/Library: UnityEditor.