using UnityEngine; namespace SC.XR.Unity.Module_PlatformAccount { public abstract class LitJsonMgr { private static LitJsonMgr instance; public static LitJsonMgr Instance { get { if (instance != null) { return instance; } else { instance = new LitJsonManager(); } return instance; } } /// /// Json保存目录 /// public string DirectoryPath { get { return Application.persistentDataPath + "/PlatformAccount/"; } } /// /// 初始化Json /// public abstract void Init(string key, T t) where T : new(); /// /// 读取Json /// public abstract T ReadJson(string key, ref T t) where T : new(); /// /// 写入Json /// public virtual void WriteJson(string key, T t) where T : new() { Save(); } /// /// 保存数据 /// public virtual void Save() { } } }