no message

This commit is contained in:
2026-02-13 07:55:30 +00:00
parent d564c5f44e
commit a45873aee0
11 changed files with 149 additions and 37 deletions

View File

@@ -98,7 +98,7 @@ public class TriggerEvents : MonoBehaviour
// Fallback to NavMeshAgent
UnityEngine.AI.NavMeshAgent agent = target.GetComponent<UnityEngine.AI.NavMeshAgent>();
if (agent != null)
if (agent != null && agent.isActiveAndEnabled && agent.isOnNavMesh)
{
agent.isStopped = true;
agent.ResetPath();