private void PlaceSolarSystems(IList <Vector3> starLocations) { foreach (Vector3 location in starLocations) { GameObject solarSystem = Instantiate( SolarSystemPrefabs[Random.Range(0, SolarSystemPrefabs.Count)], location, Quaternion.identity, transform ); SolarSystem solarSystemComponent = solarSystem.GetComponent <SolarSystem>(); solarSystemComponent.Seed = Seed + (_solarSystems.Count + 1 * NumberOfSolarSystems); solarSystemComponent.CreateStar(); _solarSystems.Add(solarSystem); } }