Nav Mesh Agent Reset Path#
Navigation / Nav Mesh Agent / Nav Mesh Agent Reset Path
Description#
Executes the Reset Path method on the Nav Mesh Agent component
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.AI;
namespace VisualScript.Runtime
{
[Title("Nav Mesh Agent Reset Path")]
[Category("Navigation/Nav Mesh Agent/Reset Path")]
[Description("Executes the Reset Path method on the Nav Mesh Agent component")]
[Image(typeof(IconNavmeshAgent), ColorTheme.Type.Red)]
[Keywords("Navigation, NavMesh, AI, Pathfinding, Agent")]
[Serializable]
public class GenInstructionNavMeshAgent_ResetPath_0 : Instruction
{
[SerializeField] private GetGameObject m_NavMeshAgent = new GetGameObject(
new GenTypeGameObject_NavMeshAgent()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Reset Path");
return $"{this.m_NavMeshAgent} {method}";
}
protected override Awaitable Run(Args args)
{
NavMeshAgent component = this.m_NavMeshAgent.Get<NavMeshAgent>(args);
if (component == null) return Done;
component.ResetPath();
return Done;
}
}
}