no message
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user