How would you go about moving a clone to the main camera parent. Or should I say how would you turn the new clone into a child of the new Parent (Main Camera). It's a c# script.
// Start Cloning Planets to create the "visit Planet Buttons" for the Main Camera.
if (GameObject.Find(SystemSizeSetup[i].name + "Sphere")){
var clone = Instantiate(GameObject.Find(SystemSizeSetup[i].name + "Sphere")); // Clone Planets
clone.name = "c" + SystemSizeSetup[i].name; // Rename Clones
} // End Cloning
The clones will line up from top to bottom, then you will be able to choose which planet to visit next. This way no matter where you go with the camera, the planets will always be lined up with the camera.
Thx, David.
P.S. is "var" not a java command, why is it working in c#? What would be the c# version?
↧