With this line of code that is written in the script attached to the ball:
“public class Ball : MonoBehaviour {
public Paddle paddle;”
What does “public Paddle paddle” do exactly? Does it create an instance of the class Paddle named paddle? Do i access the gameobject paddle or the script that is attached to the paddle? Having done that, why do i need to drag the paddle from the hierarcy in UNITY? what happens when i do that?
I feel quite confused how gameobjects and scripts hang together and how you can access different scripts and gameobjects. Maybe it is being taught later in the course? I really feel like i want to learn this “structure” so i can understand what I am doing.