This is my code, I was following along the tutorial as best as I could. I Googled and it said basically you can’t have stuff in-between namespaces, but I am not doing so AFAIK.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RPG.Movement;
namespace RPG.Control {
public class PlayerController : MonoBehaviour {
}
private void Update()
{
if (Input.GetMouseButton(0))
{
MoveToCursor();
}
}
private void MoveToCursor()
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
bool hasHit = Physics.Raycast(ray, out hit);
if (hasHit)
{
GetComponent<Mover>().MoveTo(hit.point);
}
}
}