Quantcast
Channel: Questions in topic: "clone"
Viewing all articles
Browse latest Browse all 508

Clone wants a Parent (c#)?

$
0
0
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?

Viewing all articles
Browse latest Browse all 508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>