- Home /
Find with tag problem
cursorObject = GameObject.FindWithTag("Cursor");
i get "Assets/My Assets/scripts/control.cs(30,43): error CS0117: GameObject' does not contain a definition for
FindWithTag'" this error
Unity reference says this should work, it works in java script but im using C#.
does any one know whats happening? and how i should fix it.
I found someone that had a similer error and it said to change the platform to windows but i didi and it still didnt work
i have updated to the newest unity and it still reads the error
i opened a new project and it worked till i imported all my assets
Answer by Unityprogramer10 · Aug 15, 2012 at 07:45 PM
wow now i feel stupid i had a script named GameObject and that was messing around with the FindWithTag
I've been there. It's an annoying error, mostly because you know it's entirely your own fault... glad you caught it.
Same problem, cant believe there was a GameObject script =(
Your answer
Follow this Question
Related Questions
Tag is not defined, when it has been manually created? 1 Answer
Distance thing with gameobject ? 4 Answers
difference between GameObject.FindGameObjectWithTag(Tag tag) and GameObject.FindWithTag(Tag tag) 3 Answers
"Player" tag collider from other GameObject? 1 Answer
Find the first game object created with a given name 1 Answer