Where is the error in my C# script for Unity?
I wanted to learn how to develop games in Unity using a YouTube tutorial. When I wrote a movement script to move the player left and right, I got errors, but not the script from the video. Can someone help me, because I'd like to continue learning. It's a lot of fun. (The first image is my script, and the second is from the YouTube video.)
Line 17, the first semicolon. Why is that? Get that part away!
Vector3 movement = …
Not Vector3 movement; = …
Oh, I don’t know why this is.Many thanks for your help!
No thing.
In the upper picture there is a semicolon wrong