Reply To: Code error from "chapter 3" – section: "Accessing controllers from a script"

Home Forums Books Mastering Unity 2D Game Development Code error from "chapter 3" – section: "Accessing controllers from a script" Reply To: Code error from "chapter 3" – section: "Accessing controllers from a script"

#5619

Right, let’s see if this works! 😀

Ok, need a bit more detail on the error you are seeing with the above line.

Off the top of my head, here are the possible issues you could face with that line:

– You haven’t declared the properties in that file (anim / movePlayerVector)
– You haven’t initialised the anim property in the start method
– you haven’t attached the Animator to the GameObject the script it is attached to
– You haven’t added the “Speed” property to the animator controller

Hope this helps

Simon (Darkside) Jackson
@SimonDarksideJ