private void LoadLastGameEquipment() { string tempBallName = PlayerPrefs.GetString("lastBallName", "Soccer Plain"); string tempObsticleName = PlayerPrefs.GetString("lastObsticleName", "BasicObsticle"); string tempTargetName = PlayerPrefs.GetString("lastTargetName", "Target"); foreach (var item in shopInGameManager.allItemsToBuy) { if (item.gameObject.name == tempBallName) { ballPrefab = item.gameObject; item.equiped = true; continue; } else if (item.gameObject.name == tempObsticleName) { item.equiped = true; allObsticles.obsticleToChangeTo = item.gameObject; allObsticles.ChangeObsticles(); continue; } else if (item.gameObject.name == tempTargetName) { item.equiped = true; allTargets.targetToChangeTo = item.gameObject; allTargets.ChangeTargets(); continue; } } ChangeBall(); }