Game Development Reference
In-Depth Information
movement of the AI, which will also show the result on the editor screen, as we
can see in the following screenshot:
14. We can also toggle the Show Path parameter to turn the visual gizmos On or Off .
Both results are controlled by the OnDrawGizmos() function, which we cre-
ated in our script.
We have done this step. However, if we have many waypoints, we need to add the Way-
point objects to the array one by one. This sounds like a lot of work and sometimes it's in-
convenient and takes so much time. So, in the next step, we will solve this problem by
creating CustomEditor to do this for us.
Search WWH ::




Custom Search