public void CreateVehicles() //T { int numTelescopes = 1; for (int i = 0; i < numTelescopes; i++) { //Create gameobject GameObject telescopeObject = GameObject.CreatePrimitive(PrimitiveType.Cube); //Add Script to Component Telescope telescope = telescopeObject.AddComponent <Telescope>(); telescopeObject.name = "Telescope" + i; telescope.Create(); telescopeList.Add(telescope); //!!!!!!!!!!!!! telescopeObject.transform.position = new Vector3(1000, 1000, 1000); //Add Child telescopeObject.transform.parent = gameObject.transform; } int numProbes = 1; for (int i = 0; i < numProbes; i++) { //Create gameobject GameObject probeObject = GameObject.CreatePrimitive(PrimitiveType.Cube); //Add Script to Component Probe probe = probeObject.AddComponent <Probe>(); probeObject.name = "Probe" + i; probe.Create(); probetList.Add(probe); //!!!!!!!!!!!!! probeObject.transform.position = Vector3.zero; //Add Child probeObject.transform.parent = gameObject.transform; //!!!!!!!!!!!!! probeObject.transform.position = new Vector3(300, 300, 300); } //probetList[0].vehicleCamera.enabled = true; }