using System.Collections.Generic;
using System.Diagnostics;
public class SetupWeapon {
public GameObject prefab;
public SetupWeapon(int size, GameObject goPrefab) {
var toArray = _weaponData.Select(a => a.Key).ToArray();
var toArray = _weaponData.Select(a => a.Value.poolSize).ToArray();
private GameObject[] Prefab {
var toArray = _weaponData.Select(a => a.Value.prefab).ToArray();
public Dictionary<int, SetupWeapon> _weaponData = new Dictionary<int, SetupWeapon>();
for (int i = 0; i < AttackIDs.Length; i++){
Console.WriteLine(AttackIDs[i]);
Console.WriteLine(_weaponData[0].poolSize);
Console.WriteLine(_weaponData[0].prefab.name);
Console.WriteLine(PoolSize[0]);
Console.WriteLine(Prefab[0].name);
public static void Main()
p._weaponData.Add(0, new SetupWeapon(0, new GameObject(){ name = "0"}));
p._weaponData.Add(1, null);
p._weaponData.Add(2, new SetupWeapon(2, null));