Incredibly basic question. Im starting out the "How to make a Video Game in Unity" Video series as a total beginner. After part 4 "Camera Follow" It keeps giving me the error in the title. Everything still works but Id like to understand the error.
According to the error the variable "player" has not been assigned a value in the following script
using UnityEngine;
public class FollowPlayer : MonoBehaviour
{
public Transform player;
public Vector3 offset;
// Update is called once per frame
void Update()
{
transform.position = player.position + offset;
}
}
Like in the tutorial, I dragged the object player onto the public transform box.
Would be great if anyone could spot my error :) Thanks