Hey there.
Just finished the Calculating a NavMesh path and in Scene 1 where we have been doing or code and test, code and test. Everything it working great. Our cursors that we added in the few previous lectures all work, and our movement additions to code all work as well (Can we move here? Is where we want to move to far away?) Both questions work no problem.
The issue I just encountered when I was testing was, I went from Scene 1 to Scene 2. As soon as the 2nd scene loads up the character doesn’t (can’t) move anymore and I get spammed with the error
I checked the code and line 49 of the Player Controller.cs Script is the
if (EventSystem.current.IsPointerOverGameObject()) line
private bool InteractWithUI()
{
if (EventSystem.current.IsPointerOverGameObject())
{
SetCursor(CursorType.UI);
return true;
}
return false;
}
The error also points to line 34
which is the line
if (InteractWithUI()) return;
private void Update()
{
if (InteractWithUI()) return;
if (health.IsDead())
{
SetCursor(CursorType.None);
return;
}
if (InteractWithComponent()) return;
if (InteractWithMovement()) return;
SetCursor(CursorType.None);
}
I’m sure it is something simple I overlooked, and I have even gone back a few lectures and made sure the NavMesh is set to walkable, but that as far as my knowledge of problem solving goes. Do anyone have any other ideas I might try, or things I could check??
Thank you so much everyone! Happy Easter!