Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Nav Mesh Agent Has Path#

Navigation / Nav Mesh Agent / Nav Mesh Agent Has Path

  • Can Read

  • Cannot Write

Description#

The Has Path property of 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
{
    [Get]

    [Title("Nav Mesh Agent Has Path")]
    [Category("Navigation/Nav Mesh Agent/Has Path")]
    [Description("The Has Path property of the Nav Mesh Agent component")]

    [Image(typeof(IconNavmeshAgent), ColorTheme.Type.Red)]
    [Keywords("Navigation, NavMesh, AI, Pathfinding, Agent")]

    [Serializable]
    public class GenTypeBool_NavMeshAgent_HasPath : TypeBool
    {
        [SerializeField] private GetGameObject m_NavMeshAgent = new GetGameObject(
            new GenTypeGameObject_NavMeshAgent()
        );

        public override bool GetPreview(GameObject source)
        {
            GameObject instance = this.m_NavMeshAgent.GetPreview(source);
            if (instance == null) return default;

            NavMeshAgent component = instance.GetComponent<NavMeshAgent>();
            return component != null ? component.hasPath : default;
        }

        public override bool Get(Args args)
        {
            NavMeshAgent instance = this.m_NavMeshAgent.Get<NavMeshAgent>(args);
            return instance != null
                ? instance.hasPath
                : default;
        }

        public override string ToString()
        {
            return $"{this.m_NavMeshAgent} Has Path";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.