Code Monkey Tutorial gone wrong

Do you actually have the Player component on the game object you expect it to?

I expect it won’t let you attach it to the game object because your script asset names need to match the name of the class in the case of Monobehaviours and scriptable objects. Right now your script asset is called PlayerController, but your class is called Player. You need to make them match.

Also please don’t post screenshots of code. If you need to post code follow these steps: Using code tags properly

3 Likes