Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public override void ComponentAwake()
 {
     navigationMesh = GetRequiredComponent <NavigationMeshComponent>(GetRequiredChild("NavigationMesh", FindLevelObject()));
     pathMapper     = new AStarPathMapper(navigationMesh);
     base.ComponentAwake();
 }