override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { var pointOverlap = Physics2D.OverlapCircle(animator.transform.position, 3f, 1 << (int)15); PathPoint point = pointOverlap.gameObject.GetComponent <PathPoint>(); var targetPoint = point.getNewLinkedPoint(usedPoints); if (usedPoints.Contains(targetPoint)) { usedPoints.Clear(); } usedPoints.Add(targetPoint); moveTarget = targetPoint.transform.position; }