EVERYTHING
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user