- Home /
How do you Find Object through tags in javascript?
in C sharp you can use this "FindGameObjectWithTag("Player")"
What is the JavaScript equivalent of this?
it is as simple as "GameObject.FindWithTag" ins$$anonymous$$d
Answer by Eric5h5 · Dec 05, 2010 at 02:48 AM
All Unity functions are available in Javascript. They are the same, so there's no "equivalent".
Answer by Justin Warner · Dec 05, 2010 at 02:32 AM
By the way, those are all in java.
Also, add .transform for the translation, you'll see what I mean when it comes, can't explain it (Not knowledgeable on the word usage's).
Answer by MC HALO · Dec 05, 2010 at 03:02 AM
(hit.gameObject.tag == "Naruto")
this will look for the player with the tag naruto :)
No it won't; the code you posted doesn't 'look for' anything.
Your answer
Follow this Question
Related Questions
Buff System 1 Answer
Drag Script Not Working 1 Answer
Help With LookAt Target 1 Answer
I need help with a script(brauche hilfe mit einen Script) 0 Answers
How do I check if an object is touching another object? 1 Answer