private void Update() { m_Timer += Time.deltaTime; if (m_Timer >= m_TargetSearchInterval) { m_Timer -= m_TargetSearchInterval; PathRequestSingleton.RequestPath(transform.position, m_Target.position, OnPathFound); } }
public void TryToMoveToDestination(Vector3 targetPosition) { PathRequestSingleton.RequestPath(transform.position, targetPosition, OnPathFound); }