// Use this for initialization void Start() { shipDesign = OptionsController.GetCurrentShip(); // Initialize Play currentLives = lives; NewLife(); // Get Engines GameObject engines = OptionsController.GetCurrentEngines(); foreach (Transform child in engines.transform) { Vector3 pos; if (child.position.x == 0) { pos = shipDesign.transform.FindChild("Center Engine").position; } else if (child.position.x < 0) { pos = shipDesign.transform.FindChild("Left Engine").position; } else { pos = shipDesign.transform.FindChild("Right Engine").position; } GameObject go = Instantiate(child.gameObject, pos + transform.position, Quaternion.identity) as GameObject; go.transform.parent = transform; } }