I cant get the basic FollowPlayer script to go to Main Camera in the hierarchy
I am in the Create with Code Live class and I got stuck near the beginning of class today. We were asked to create the code FollowPlayer in the project window (easy enough) and then to drag FollowPlayer to the Main Camera so that we could start making edits that would apply to the main camera.
When I do this, I get an error that reads
"Can't add script behaviour AssemblyInfo.cs. The script needs to derive from MonoBehaviour!"
The error codes that come up in the console are:
Assets\Scripts\PlayerController.cs(7,24): error CS1003: Syntax error, ',' expected
and
Assets\Scripts\PlayerController.cs(7,29): error CS1002: ; expected
What I can see in the code with Visual Studio is:
1 using System.Collections; 2 using System.Collections.Generic; 3 using UnityEngine; 4
0 references 5 public class FollowPlayer : MonoBehaviour 6 { 7 // Start is called before the first frame update 0 references 8 void Start() 9 { 10
11 } 12 13 // Update is called once per frame 14 void Update() 15 { 16
17 } 18 } 19
If there is anything else I can do to help you understand the problem, please let me know. I am desperate to solve this so that I can catch up with the rest of the class. I don't want to fall behind!
Thank you all so much for taking the time to read my question and try to help me.