I have an object with the AIPath script on it, and another script which acts as the object’s brain. The brain gets a reference to the AIPath script (stored as “pathfinder”) and can set its target fine with pathfinder.target = somePatrolPoint. However, checking to see whenever TargetReached becomes true in a while loop doesn’t seem to work. The OnTargetReached function gets called in AIPath correctly so the object is reaching its destination, but I can’t seem to access that moment from outside of the AIPath script. Any help would be appreciated!
Is it possible that you have the repathRate set to 0? Currently the AIPath.TargetReached property always returns false during frames when paths were calculated. If the path is recalculated every frame then it might never get set to true.
This oddity in behavior will be fixed in the next update.
It turns out the issue was some kind of conflict with an outdated UI plugin which was resolved in a recent update. Not entirely sure why they were interacting but the issue seems to be resolved now, thank you for the reply!