Files
BlockSpace-v1.5.0b/Assets/Scripts/Assembly-CSharp/Photon/VR/Saving/PhotonVRValueSaver.cs
T
2026-06-01 17:19:55 +02:00

30 lines
820 B
C#

using System.Collections.Generic;
using UnityEngine;
namespace Photon.VR.Saving
{
public class PhotonVRValueSaver : MonoBehaviour
{
public static void SaveDictionary(string location, Dictionary<string, string> value)
{
PlayerPrefs.SetString(location, string.Join(",", value.Keys));
foreach (KeyValuePair<string, string> item in value)
{
PlayerPrefs.SetString(location + item.Key, item.Value.ToString());
}
}
public static Dictionary<string, string> GetDictionary(string location)
{
string[] array = PlayerPrefs.GetString(location).Split(',');
Dictionary<string, string> dictionary = new Dictionary<string, string>();
string[] array2 = array;
foreach (string text in array2)
{
dictionary[text] = PlayerPrefs.GetString(location + text);
}
return dictionary;
}
}
}