public void InstantiateBlueprint(GameObject blueprint) { if (!BlueprintIsSelected) { if (blueprint == ballisticTurretPrefab) { BallisticTurret ballisticTurret = ObjectPooler.Instance.ballisticTurretPool.Retrieve(); ballisticTurret.Relocate(); } else if (blueprint == energyTurretPrefab) { EnergyTurret energyTurret = ObjectPooler.Instance.energyTurretPool.Retrieve(); energyTurret.Relocate(); } else if (blueprint == missileTurretPrefab) { MissileTurret missileTurret = ObjectPooler.Instance.missileTurretPool.Retrieve(); missileTurret.Relocate(); } else if (blueprint == solarPanelsPrefab) { SolarPanels solarPanels = ObjectPooler.Instance.solarPanelsPool.Retrieve(); solarPanels.Relocate(); } else if (blueprint == windTurbinePrefab) { WindTurbine windTurbine = ObjectPooler.Instance.windTurbinePool.Retrieve(); windTurbine.Relocate(); } else if (blueprint == minerPrefab) { Miner miner = ObjectPooler.Instance.minerPool.Retrieve(); miner.Relocate(); } } }