private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
private void Awake() { if (instance == null) { instance = this; } //var heroPrefabs = Resources.LoadAll<GameObject>("Prefabs/Heros"); //foreach (var heroPrefab in heroPrefabs) //{ // heroPrefabList.Add(heroPrefab); //} //var monsterPrefabs = Resources.LoadAll<GameObject>("Prefabs/Monsters"); //foreach (var monsterPrefab in monsterPrefabs) //{ // heroPrefabList.Add(monsterPrefab); //} }