holopy3/Assets/Scripts/NavMeshBaker.cs
2020-12-10 15:25:12 +01:00

30 lines
489 B
C#

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();
}
}
}
}