I’ve matched the code exactly as the tutorial but I’m still getting this error and can’t complete the game.
Assets\Scripts\MoveLeft.cs(8,13): error CS0246: The type or namespace name 'PlayerController' could not be found (are you missing a using directive or an assembly reference?)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MoveLeft : MonoBehaviour
{
private float speed = 30;
private PlayerController playerControllerScript;
// Start is called before the first frame update
void Start()
{
playerControllerScript = GameObject.Find("Player").GetComponent<PlayerController>();
}
// Update is called once per frame
void Update()
{
if (playerControllerScript.gameOver == false)
{
transform.Translate(Vector3.left * Time.deltaTime * speed);
}
}
}