Woao - Slow down a bit. Perhaps it was covered in a different course, but I don’t recall seeing
"[RequireComponent(typeof(Waypoint))]" before now. Why is this necessary?Doesn’t GetComponent<> do the trick on its own? Could you detail a little more about this, so those of us seeing this for the first time can better understand its correct usage.
Also why was “gridPos” defined in the Waypoint script - is it used somewhere later, or perhaps referenced in a different script? Or was it merely part of the creative process, but was ultimately not required?
Finally, adding to that mentioned in a separate post, usage of “new” still eludes me. In this case I am referring to it’s use in “return new Vector2D” in the Waypoint script. I Can’t explain why I am not getting it - it is currently my Achilles heel, especially since it has cropped up numerous times, and I still don’t get it.