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