Proper indentation would help make this readable and the problem more obvious. The issue is that you are do a while loop with this condition:
FollowerState == FollowOrIdle.Following
...but nothing in the loop changes 'FollowerState', and you do not 'yield' in the loop, so control never goes anywhere else that could change 'FollowerState' to something besides 'FollowOrIdle.Following'. So you cycle in the loop forever hanging Unity.
↧