At the end of this lesson, I am getting the following error. I went over the scripts (even went to the resources to ensure I had it correct). All my code looks like yours, but I can not figure this one out? Thoughts?
Actually, the line of code with your error is different from Hugo’s code…
private void SetSelectedUnit(Unit unit)
{
selectedUnit = unit;
SetSelectedAction(unit.GetAction<MoveAction>()); //yours reads SetSelectedAction9unit.GetmoveAction()
OnSelectedUnitChanged?.Invoke(this, EventArgs.Empty);
}
I believe early in the course, we actually start with GetMoveAction, but it is then refactored into a generic GetAction method.
If this still doesn’t work, paste in your Unit.cs script and we’ll have a look.
Thanks so much, yep, this did the trick. I am really enjoying the course and glad I can push forward again. I’m learning a lot.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.