| | |
| | | } |
| | | |
| | | public static VersionConfig config = null; |
| | | // public static VersionConfig Get() |
| | | // { |
| | | // if (config == null) |
| | | // { |
| | | // if (Application.isEditor) |
| | | // { |
| | | // config = Resources.Load<VersionConfig>("VersionConfig"); |
| | | // //debug登录后第二次启动默认恢复test |
| | | // if (LocalSave.GetBool("RestoreTest")) |
| | | // { |
| | | // config.m_AppId = "test"; |
| | | // LocalSave.SetBool("RestoreTest", false); |
| | | // Debug.Log("appid 恢复test"); |
| | | // } |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // var text = Resources.Load<TextAsset>("VersionConfigEx"); |
| | | // if (text != null) |
| | | // { |
| | | // config = ScriptableObject.CreateInstance<VersionConfig>(); |
| | | // var json = JsonMapper.ToObject(text.text); |
| | | // ReadJson(json); //逐一解析,不用VersionConfig类结构读取,因为变量定义是按asset的结构定义的 |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // return config; |
| | | // } |
| | | public static VersionConfig Get() |
| | | { |
| | | return config; |
| | | } |
| | | |
| | | public static void ReadJson(JsonData _data) |
| | | { |