// **************************************************************************************************** // MULTI-THREADED FUNCTIONS, THANKS TO UNITY TASKS // **************************************************************************************************** IEnumerator _plotAStar(Vector3 s, Vector3 g, CombatManager cmt) { astar = new AStarSearch(NavSystem.S.getAStarGrid(), s, g); astar.initiateSearch(); yield return(StartCoroutine(astar.WaitFor())); plotTheRoute(cmt); }