Hey,
I have been trying to tweak the AIPath movement code lines in order to combine this script class with my own customer waypoint manager script.
The only thing that my waypoint manager does is finding the correct waypoint path based upon spawn location. Once spawned, it will immediately assign the correct waypoint path, then it assigns aipath.target to the current target in the waypoint path. Upon reaching the waypoint (transform.position == targetwaypoint.position) it changes the target to the next waypoint transform stored in the array.
My prefab that spawns is a prefab with the ‘mob’ gameobject as a child. The parent is the one with all the scripts attached! The weirdness is that upon reaching the target it does not change the target to the next one in the waypoint array. When I disable AIPath script and put simple MoveTowards line into my waypoint movement script it does everything correctly (finds each waypoint, move towards it, change to next waypoint on reaching it) but when AIPath is enabled it simply does not want to change to next waypoint.
Thank you for Helping Out!