示例#1
0
        private void Awake()
        {
            destination    = new Vector3(0f, 0f, 0f);
            navigationMesh = navigationMeshObject?.GetComponent <NavigationMeshComponent>()
                             ?? throw new UnityException("Navigation mesh is missing required Navigation Mesh Component");

            pathMapper = new AStarPathMapper(navigationMesh);
        }
示例#2
0
 public AStarPathMapper(NavigationMeshComponent navMesh)
 {
     this.navigationMesh = navMesh;
 }