private void SaveCurrencies(List <Currency> currencies) { for (int i = 0; i < currencies.Count; i++) { CustomPlayerPrefs.SetFloat(currencies[i].Name, currencies[i].Value); } }
void OnApplicationQuit() { CustomPlayerPrefs.SetBool("isMaskFlipped", isFlipped, true); CustomPlayerPrefs.SetFloat("maskScale", maskScale, true); CustomPlayerPrefs.SetInt("selectedMaskID", selectedMaskID, true); CustomPlayerPrefs.SetFloat("maskAlpha", maskMat.GetColor("_Color").a, true); CustomPlayerPrefs.SetFloat("maskColor_R", maskMat.GetColor("_Color").r, true); CustomPlayerPrefs.SetFloat("maskColor_G", maskMat.GetColor("_Color").g, true); CustomPlayerPrefs.SetFloat("maskColor_B", maskMat.GetColor("_Color").b, true); }