After including the transform.position line the script causes the error “Assets\FollowCamera.cs(11,61): error CS1002: ; expected” when pressing play in the Unity editor.
As far as I can see it my script is the same as the one from the instructor. What could be the cause of the problem?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FollowCamera : MonoBehaviour
{
[SerializeField] GameObject thingToFollow;
// Update is called once per frame
void LateUpdate()
{
transform.position = thingToFollow.transform.position new Vector3 (0,0,-10);
}
}
Picture 1 Script
Picture 2 error message in unity editor.
Software Versions:
Visual Studio Code 1.62.3
Unity 2021.2.2f1 Personal
Running on Windows 10