Type 'Block' not found

In the lecture, Ben types:

[SerializeField] List path;

and it works. When I do this, I get the following error:

“The type or namespace name ‘Block’ could not be found (are you missing a using directive or assembly reference?)”

My code is the same. Any ideas for what is going on and how to fix this?

Hello i am not sure but…
I had the same problem, i think there is problem during the changing of script/class name …
Ben rewrited the name of script form “Block” to “Waypoint”

Then you need the rewrite Block to class Waypoint in the EnemyMovement.css
The code will be…

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

    public class EnemyMovement : MonoBehaviour

        [SerializeField] List<Waypoint> path;

        // Use this for initialization
        void Start()

        private void PrintAllWaypoints()
            foreach (Waypoint waypoint in path)

        // Update is called once per frame
        void Update()


But i am not sure…This is my First c# course…Maybe someone help… :slight_smile:

Privacy & Terms