private void Awake() { DontDestroyOnLoad(gameObject); string filepath = Application.dataPath + "/rune31/Scripts/GameData/" + "Rune.json"; string jsons = File.ReadAllText(filepath); var _totalPool = JsonConvert.DeserializeObject <_Runes>(jsons); totalPool = _totalPool.Runes; if (instance != null) { Destroy(gameObject); return; } instance = this; //Debug.Log(totalpool.Runes[0].name); //Debug.Log(totalpool.Runes.Count); }
void Awake() { if (instance != null) { Destroy(gameObject); return; } instance = this; totalPool = TotalPool.instance; foreach (Rune rune in totalPool.totalPool) { if (rune.collection == "Base" || rune.collection == "Unlock") { avaPool.Add(rune); } } //Debug.Log(avapool.Runes[0].name); //Debug.Log(avapool.Runes.Count); }