public void Start() { if (target != null && target != lastTarget) { StackRequestV2.RequestPath(new PathRequest(transform.position, target.position, OnPathFound)); lastTarget = target; } }
void Awake() { instance = this; pathfinding = GetComponent <AStarAlgoV2>(); }