That us how you do it. But you see the GetComponentInChildren() method only goes to the transform's children and not to its children's children and so fourth. You'll have to run a nested loop in order to get deeper in the heirarcy. The deeper the heirarcy the more nested loops you'll need although I think you can make an algorithem for that. Search binary trees collection and you'll see the solution too
Hi Guys, currently i´m programmin' a PacMan-Clone and I want to count the "Dots" left in Game (not eaten jet). Thought I could make an Array of all GameObjects with Tag ("Finish") (all Dots are tagged "Finish") -> then get the lenght.
Develop once, publish everywhere! Unity is the ultimate tool for video game development, architectural visualizations, and interactive media installations – publish to the web, Windows, OS X, Wii, Xbo...
I´ve opened another Project and got no Errors with "var gos : GameObject;" I got back to my PacMan-Project and got no Errors with the exact same line of code: var gos : GameObject; the Error-Message was like "expectet ; found ["
Have a nice time, enjoy your live, don´t hate, don´t kill, be honest and honorable. I´ll leave this group now, sry thougt of some Thinkers-Content, but i discovered some bastion of facebook-pseudo-philosophers. ;) don´t be haten, you´re all good. but this group doesn´t share the content I was looking for.
i watched some video-tutorials first. from "theslayer"-, "tornadotwins"- and somemore-youtube-channel. there i got the undrrstanding how i access gameobjects and their components. when i start coding and scene-upsetting (doin prefabs, materials,...) i don't keep redoing an tutorial, so I stick to docs.unity3d.com - viewing the script-reference. This is, on the long run the faster method, isn't it?
Hey Dudes, also new into this stuff. the next month i check out Unity, and try to do some basic games (pong 'n stuff). At first i don´t want to import 3d-Meshes, Animations, etc. I´ll mostly use the basic Game-Objects and the Basics of the Scriptin API (i stick to the java-style One, not c# n not boo). May you have some basic syntax-collections for me, so i don´t have to way through that whole API-Ref.-Thing. (mean Operators (+ - * / = %) (& && | ||) is it the same like java) (mean basic vars (int float string boolean)) (mean transform.TransformDirection(Vector3); moving Objects, accessing Collider, call other sripts (is there a namespace or so?)) Thx'n happy Gaming