22 lines
488 B
C#
22 lines
488 B
C#
#if UNITY_EDITOR
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
using UnityEngine.AI;
|
|
|
|
namespace Editors
|
|
{
|
|
public static class ForceCleanupNavMeshTool
|
|
{
|
|
[MenuItem("Tools/Force Cleanup NavMesh")]
|
|
public static void ForceCleanupNavMesh()
|
|
{
|
|
if (Application.isPlaying)
|
|
return;
|
|
|
|
NavMesh.RemoveAllNavMeshData();
|
|
Debug.Log("Force Cleanup NavMesh: Successfully removed all baked NavMesh data.");
|
|
}
|
|
}
|
|
}
|
|
#endif
|