using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; public class NavMeshBaker : MonoBehaviour { [SerializeField] public NavMeshSurface[] surfaces; void Start() { } private void Update() { if (Input.GetKeyDown("up")) { print("!"); for (int i = 0; i < surfaces.Length; i++) { surfaces[i].BuildNavMesh(); } } } }