How to reference script in unity (C#) ?
I am new to unity and C# as well. I want to dynamically create script. For that I've made a gameobject and attached a script to it. In that script I want to add one script variable named Ball but when I make it like -
public Ball ball;
one error comes which says that CS0246: The type or namespace name 'Ball' could not be found (are you missing a using directive or an assembly reference?)
The name of my script is Ball only but still I am getting this problem. Ultimately I want to AddComponent with Ball type script. How to proceed ?
Your answer
Follow this Question
Related Questions
How to assign Instantiated object through script? 1 Answer
How to stop movement script on void start and resume after. 0 Answers
How do i put "Wasted!" after respawn? 0 Answers
Duplicate script 1 Answer
Scripts Interfering With Each Other 1 Answer