- Home /
Question by
Vuzok · Jul 20, 2016 at 05:13 PM ·
c#getcomponentreferencenamespacereference-other-object
Referencing another C# Script Error
I am receiving the following error: The type or namespace name 'Bust' could not be found (are you missing a using directive or an assembly reference?)
The script Bust.cs is on my BustedBox gameobject but it seems to be ignoring it and it thinks that an old script called Busted.js is still on the gameobject. I am stumped if anyone has a few minutes to spare some help would be awesome.
GameObject buster = GameObject.Find("BustedBox");
Bust busterScript = buster.GetComponent<Bust>();
Comment
Your answer
Follow this Question
Related Questions
Why we have to use getcomponent instead of a simple reference ? 2 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers