using System.Collections; using System.Collections.Generic; using NodeCanvas.Framework; using UnityEngine; using UnityEngine.AI; namespace Net.Project.B.NodeCanvas { public class WarpNavMeshAgentTask : ActionTask { public BBParameter Target; public BBParameter Agent; protected override void OnExecute() { if (Agent.isNull || Agent.value.TryGetComponent(out var navMeshAgent) is false) { EndAction(false); return; } navMeshAgent.Warp(Target.value.position); EndAction(true); } } }