Assets\Scripts\HoverboardGrindController.cs(15,12): error CS0246: The type or namespace name 'GrindableSurface' could not be found (are you missing a using directive or an assembly reference?)

Assets\Scripts\HoverboardGrindController.cs(19,12): error CS0246: The type or namespace name 'GrindableSurface' could not be found (are you missing a using directive or an assembly reference?)

Assets\Scripts\HoverboardGrindController.cs(45,27): error CS0246: The type or namespace name 'GrindableSurface' could not be found (are you missing a using directive or an assembly reference?)

Script 1: using UnityEngine;
using UnityEngine.UI;

public class HoverboardGrindController : MonoBehaviour
{
    [Header("Grind UI")]
    public Slider grindBalanceSlider; // Assign the slider in the inspector

    [Header("Grind Detection")]
    public float detectionRadius = 5f;
    public LayerMask grindableLayer;
    public KeyCode grindKey = KeyCode.G; // Key to start grinding

    // Make isGrinding and CurrentGrindSurface public
    public GrindableSurface CurrentGrindSurface { get; private set; }
    public bool IsGrinding { get; private set; }

    // Make FindClosestGrindableSurface and StartGrinding public
    public GrindableSurface FindClosestGrindableSurface()
    {
        Collider[] hits = Physics.OverlapSphere(transform.position, detectionRadius, grindableLayer);
        GrindableSurface closestSurface = null;
        float closestDistanceSqr = Mathf.Infinity;
        Vector3 currentPosition = transform.position;

        foreach (Collider hit in hits)
        {
            GrindableSurface surface = hit.GetComponent<GrindableSurface>();
            if (surface != null)
            {
                Vector3 directionToSurface = hit.transform.position - currentPosition;
                float dSqrToSurface = directionToSurface.sqrMagnitude;
                if (dSqrToSurface < closestDistanceSqr)
                {
                    closestDistanceSqr = dSqrToSurface;
                    closestSurface = surface;
                }
            }
        }

        return closestSurface;
    }

    // Make FindClosestGrindableSurface and StartGrinding public
public void StartGrinding(GrindableSurface grindSurface)
{
    IsGrinding = true;
    CurrentGrindSurface = grindSurface; // Set the current grind surface
    grindBalanceSlider.gameObject.SetActive(true);

    // You can run additional logic here (like animations, scoring system, etc.)
}

    // Update method (includes key press logic)
    public void Update()
    {
        // Check for grind key press and toggle grinding
        if (Input.GetKeyDown(grindKey))
        {
            CurrentGrindSurface = FindClosestGrindableSurface();
            if (CurrentGrindSurface != null)
            {
                StartGrinding(CurrentGrindSurface);
            }
        }
        else if (Input.GetKeyUp(grindKey))
        {
            EndGrinding();
        }

        if (IsGrinding)
        {
            GrindAlongSurface();
            UpdateGrind();  // Call the UpdateGrind method from HoverboardGrindController
            // HandleGrindBalance(); // You can implement balance functionality here if needed
        }
    }

    // Method to end grinding
    public void EndGrinding()
    {
        SetGrinding(false); // Use the SetGrinding method to safely change the grind state.

        grindBalanceSlider.gameObject.SetActive(false);

        // You can run additional logic here (like animations, scoring system, etc.)
    }

    // Method to handle movement along the surface while grinding
    private void GrindAlongSurface()
    {
        if (CurrentGrindSurface != null)
        {
            transform.position += CurrentGrindSurface.GetDirection() * CurrentGrindSurface.GetSpeed() * Time.deltaTime;
            // Here you could add checks to see if the grind has reached the end of the surface
            // And additional logic such as effects, scoring, and so on
        }
    }

    // Update grind logic
    private void UpdateGrind()
    {
        // Update grind logic
    }

    // Method to set the grinding state
    public void SetGrinding(bool isGrinding)
    {
        IsGrinding = isGrinding;
        if (!IsGrinding)
        {
            CurrentGrindSurface = null; // Ensure it’s null when you stop grinding
        }
    }
}

Script 2:using UnityEngine;
using System.Collections; // Correct using directive for coroutines
using UnityEngine.Events;
using System.Collections.Generic;

[System.Serializable]
public class Waypoint
{
    public Transform position;
    public UnityEvent OnReachWaypoint; // Custom event on each waypoint if needed
}

public class IntegratedGrindHoverSystem : MonoBehaviour
{
    [Header("Waypoint Path")]
    public List<Waypoint> waypoints; // List of all waypoints for the system

    [Header("Movement Properties")]
    public float movementSpeed = 5f;
    public bool moveInOneDirection = true;
    public bool modifyMovementSpeedEnabled = true;
    public float maxMovementSpeed = 2f;
    public float minMovementSpeed = 0.1f;
    public float modifyMovementSpeedFactor = 5f;

    [Header("Events")]
    public UnityEvent OnPathStart;
    public UnityEvent OnPathEnd;

    private Transform targetObject; // The object (player or vehicle) currently moving along the path
    private bool isMoving = false;
    private float speedMultiplier = 1f;
    private Coroutine moveCoroutine; // Added variable to store the coroutine reference

    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Player") && !isMoving)
        {
            targetObject = other.transform;
            OnPathStart.Invoke();
            // Start the coroutine and store the reference
            moveCoroutine = StartCoroutine(MoveAlongPath());
        }
    }

    void OnTriggerExit(Collider other)
    {
        if (other.CompareTag("Player") && isMoving)
        {
            // Stop the coroutine using the stored reference
            if (moveCoroutine != null)
            {
                StopCoroutine(moveCoroutine);
                moveCoroutine = null; // Reset the coroutine reference
            }
            OnPathEnd.Invoke();
            isMoving = false;
        }
    }

    IEnumerator MoveAlongPath()
    {
        isMoving = true;
        int waypointIndex = 0;
        float movementSpeedAdjustment = movementSpeed;

        while (waypointIndex < waypoints.Count)
        {
            Waypoint currentWaypoint = waypoints[waypointIndex];
            while (Vector3.Distance(targetObject.position, currentWaypoint.position.position) > 0.01f)
            {
                // Implement dynamic speed modification if required
                if (modifyMovementSpeedEnabled)
                {
                    // Here we would need access to input or current state to adjust speedMultiplier
                    // For example: speedMultiplier = Mathf.Lerp(speedMultiplier, targetInput, Time.deltaTime * modifyMovementSpeedFactor);
                }
                movementSpeedAdjustment = movementSpeed * speedMultiplier;

                // Move the targetObject towards the current waypoint
                targetObject.position = Vector3.MoveTowards(targetObject.position, currentWaypoint.position.position, Time.deltaTime * movementSpeedAdjustment);

                yield return null;
            }

            // Invoke custom events per waypoint if needed
            currentWaypoint.OnReachWaypoint.Invoke();

            if (moveInOneDirection)
            {
                waypointIndex++;
            }
            else
            {
                // Implement logic for bi-directional movement if needed
            }
        }

        OnPathEnd.Invoke();
        isMoving = false;
        moveCoroutine = null; // Reset the coroutine reference
    }

    // … Implementation of Gizmo visualization and dynamic waypoint handling from hoverBoardWayPoints …

    // You might need to expand here for functionality like adding/removing waypoints, visualization, and so on, based on hoverBoardWayPoints script
}

Fix please