[Question] public Paddle paddle

What happens if i write < public GameObject paddle > instead of < public Paddle paddle > ? Does it make any difference?

Yes, by public Paddle paddle you are acessing the script and by public GameObject paddle you would access the GameObject.

If you access just the GameObject you wouldn’t have access to the methods within the script and if you access the script you wouldn’t be able to access a few things that are characteristic of the game object.


Privacy & Terms