public void Awake() { Instance = this; GameObject config = (GameObject)ResourcesHelper.Load("KV"); string configStr = config.Get <TextAsset>("GlobalProto").text; this.GlobalProto = JsonHelper.FromJson <GlobalProto>(configStr); }
public void Awake() { if (File.Exists(path)) { this.globalProto = JsonHelper.FromJson <GlobalProto>(File.ReadAllText(path)); } else { this.globalProto = new GlobalProto(); } }