Cute_demon_attacks/meng_yao/Assets/script/NavMeshBuilder.cs
2024-12-09 11:56:41 +08:00

15 lines
315 B
C#

using UnityEditor;
using UnityEngine.AI;
using UnityEngine;
public class NavMeshBuilder
{
[MenuItem("Tools/Build NavMesh")]
public static void BuildNavMesh()
{
// 调用此方法生成导航网格
UnityEditor.AI.NavMeshBuilder.BuildNavMesh();
Debug.Log("NavMesh has been built!");
}
}