Once I had implemented the code, I could select the ability in the action bar (the cursor turns to the selected icon) and then click somewhere to confirm target. However, the cursor didn’t revert back to the original after I clicked.
Upon investigation, I found in my PlayerController.cs the SetCursor method had this code:
private void SetCursor(CursorType type)
{
if (currentCursor == type) { return; }
CursorMapping mapping = GetCursorMapping(type);
Cursor.SetCursor(mapping.texture, mapping.hotspot, CursorMode.Auto);
currentCursor = type;
}
Getting rid of the if statement and currentCursor = type lines fixed the issue.
Not sure if this was something I missed from the earlier lectures or not, but thought it might help anyone having similar issues.