holopy3/Assets/Scripts/NavMeshBaker.cs

31 lines
489 B
C#
Raw Permalink Normal View History

2020-12-10 14:25:12 +00:00
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();
}
}
}
}