Show / Hide Table of Contents

Class NavMeshAgent

Inheritance
Object
Object
Component
Behaviour
NavMeshAgent
Inherited Members
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.transform
Component.gameObject
Component.GetComponent(Type)
Component.GetComponent<T>()
Component.GetComponent(String)
Component.GetComponentInChildren(Type, Boolean)
Component.GetComponentInChildren(Type)
Component.GetComponentInChildren<T>(Boolean)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren(Type, Boolean)
Component.GetComponentsInChildren(Type)
Component.GetComponentsInChildren<T>(Boolean)
Component.GetComponentsInChildren<T>(Boolean, List<T>)
Component.GetComponentsInChildren<T>()
Component.GetComponentsInChildren<T>(List<T>)
Component.GetComponentInParent(Type)
Component.GetComponentInParent<T>()
Component.GetComponentsInParent(Type, Boolean)
Component.GetComponentsInParent(Type)
Component.GetComponentsInParent<T>(Boolean)
Component.GetComponentsInParent<T>(Boolean, List<T>)
Component.GetComponentsInParent<T>()
Component.GetComponents(Type)
Component.GetComponents(Type, List<Component>)
Component.GetComponents<T>(List<T>)
Component.tag
Component.GetComponents<T>()
Component.CompareTag(String)
Component.SendMessageUpwards(String, Object, SendMessageOptions)
Component.SendMessageUpwards(String, Object)
Component.SendMessageUpwards(String)
Component.SendMessageUpwards(String, SendMessageOptions)
Component.SendMessage(String, Object)
Component.SendMessage(String)
Component.SendMessage(String, Object, SendMessageOptions)
Component.SendMessage(String, SendMessageOptions)
Component.BroadcastMessage(String, Object, SendMessageOptions)
Component.BroadcastMessage(String, Object)
Component.BroadcastMessage(String)
Component.BroadcastMessage(String, SendMessageOptions)
Object.GetInstanceID()
Object.GetHashCode()
Object.Equals(Object)
Object.name
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate(Object, Transform, Boolean)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Instantiate<T>(T, Transform, Boolean)
Object.Destroy(Object, Single)
Object.Destroy(Object)
Object.DestroyImmediate(Object, Boolean)
Object.DestroyImmediate(Object)
Object.FindObjectsOfType(Type)
Object.DontDestroyOnLoad(Object)
Object.hideFlags
Object.DestroyObject(Object, Single)
Object.DestroyObject(Object)
Object.FindSceneObjectsOfType(Type)
Object.FindObjectsOfTypeIncludingAssets(Type)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.FindObjectsOfTypeAll(Type)
Object.FindObjectOfType(Type)
Object.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEngine.AI
Assembly: UnityEngine.dll
Syntax
[MovedFrom("UnityEngine")]
public sealed class NavMeshAgent : Behaviour

Properties

acceleration

Declaration
public float acceleration { get; set; }
Property Value
Type Description
Single

agentTypeID

Declaration
public int agentTypeID { get; set; }
Property Value
Type Description
Int32

angularSpeed

Declaration
public float angularSpeed { get; set; }
Property Value
Type Description
Single

areaMask

Declaration
public int areaMask { get; set; }
Property Value
Type Description
Int32

autoBraking

Declaration
public bool autoBraking { get; set; }
Property Value
Type Description
Boolean

autoRepath

Declaration
public bool autoRepath { get; set; }
Property Value
Type Description
Boolean

autoTraverseOffMeshLink

Declaration
public bool autoTraverseOffMeshLink { get; set; }
Property Value
Type Description
Boolean

avoidancePriority

Declaration
public int avoidancePriority { get; set; }
Property Value
Type Description
Int32

baseOffset

Declaration
public float baseOffset { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

currentOffMeshLinkData

Declaration
public OffMeshLinkData currentOffMeshLinkData { get; }
Property Value
Type Description
OffMeshLinkData
| Improve this Doc View Source

desiredVelocity

Declaration
public Vector3 desiredVelocity { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

destination

Declaration
public Vector3 destination { get; set; }
Property Value
Type Description
Vector3

hasPath

Declaration
public bool hasPath { get; }
Property Value
Type Description
Boolean

height

Declaration
public float height { get; set; }
Property Value
Type Description
Single

isOnNavMesh

Declaration
public bool isOnNavMesh { get; }
Property Value
Type Description
Boolean

isOnOffMeshLink

Declaration
public bool isOnOffMeshLink { get; }
Property Value
Type Description
Boolean

isPathStale

Declaration
public bool isPathStale { get; }
Property Value
Type Description
Boolean

isStopped

Declaration
public bool isStopped { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

navMeshOwner

Declaration
public Object navMeshOwner { get; }
Property Value
Type Description
Object
| Improve this Doc View Source

nextOffMeshLinkData

Declaration
public OffMeshLinkData nextOffMeshLinkData { get; }
Property Value
Type Description
OffMeshLinkData
| Improve this Doc View Source

nextPosition

Declaration
public Vector3 nextPosition { get; set; }
Property Value
Type Description
Vector3

obstacleAvoidanceType

Declaration
public ObstacleAvoidanceType obstacleAvoidanceType { get; set; }
Property Value
Type Description
ObstacleAvoidanceType
| Improve this Doc View Source

path

Declaration
public NavMeshPath path { get; set; }
Property Value
Type Description
NavMeshPath
| Improve this Doc View Source

pathEndPosition

Declaration
public Vector3 pathEndPosition { get; }
Property Value
Type Description
Vector3

pathPending

Declaration
public bool pathPending { get; }
Property Value
Type Description
Boolean

pathStatus

Declaration
public NavMeshPathStatus pathStatus { get; }
Property Value
Type Description
NavMeshPathStatus

radius

Declaration
public float radius { get; set; }
Property Value
Type Description
Single

remainingDistance

Declaration
public float remainingDistance { get; }
Property Value
Type Description
Single

speed

Declaration
public float speed { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

steeringTarget

Declaration
public Vector3 steeringTarget { get; }
Property Value
Type Description
Vector3

stoppingDistance

Declaration
public float stoppingDistance { get; set; }
Property Value
Type Description
Single

updatePosition

Declaration
public bool updatePosition { get; set; }
Property Value
Type Description
Boolean

updateRotation

Declaration
public bool updateRotation { get; set; }
Property Value
Type Description
Boolean

updateUpAxis

Declaration
public bool updateUpAxis { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

velocity

Declaration
public Vector3 velocity { get; set; }
Property Value
Type Description
Vector3

walkableMask

Declaration
[Obsolete("Use areaMask instead.")]
public int walkableMask { get; set; }
Property Value
Type Description
Int32

Methods

ActivateCurrentOffMeshLink(Boolean)

Declaration
public void ActivateCurrentOffMeshLink(bool activated)
Parameters
Type Name Description
Boolean activated
| Improve this Doc View Source

CalculatePath(Vector3, NavMeshPath)

Declaration
public bool CalculatePath(Vector3 targetPosition, NavMeshPath path)
Parameters
Type Name Description
Vector3 targetPosition
NavMeshPath path
Returns
Type Description
Boolean

CompleteOffMeshLink()

Declaration
public void CompleteOffMeshLink()

FindClosestEdge(out NavMeshHit)

Declaration
public bool FindClosestEdge(out NavMeshHit hit)
Parameters
Type Name Description
NavMeshHit hit
Returns
Type Description
Boolean

GetAreaCost(Int32)

Declaration
public float GetAreaCost(int areaIndex)
Parameters
Type Name Description
Int32 areaIndex
Returns
Type Description
Single

GetLayerCost(Int32)

Declaration
[Obsolete("Use GetAreaCost instead.")]
public float GetLayerCost(int layer)
Parameters
Type Name Description
Int32 layer
Returns
Type Description
Single
| Improve this Doc View Source

Move(Vector3)

Declaration
public void Move(Vector3 offset)
Parameters
Type Name Description
Vector3 offset
| Improve this Doc View Source

Raycast(Vector3, out NavMeshHit)

Declaration
public bool Raycast(Vector3 targetPosition, out NavMeshHit hit)
Parameters
Type Name Description
Vector3 targetPosition
NavMeshHit hit
Returns
Type Description
Boolean

ResetPath()

Declaration
public void ResetPath()

Resume()

Declaration
[Obsolete("Set isStopped to false instead")]
public void Resume()

SamplePathPosition(Int32, Single, out NavMeshHit)

Declaration
public bool SamplePathPosition(int areaMask, float maxDistance, out NavMeshHit hit)
Parameters
Type Name Description
Int32 areaMask
Single maxDistance
NavMeshHit hit
Returns
Type Description
Boolean

SetAreaCost(Int32, Single)

Declaration
public void SetAreaCost(int areaIndex, float areaCost)
Parameters
Type Name Description
Int32 areaIndex
Single areaCost
| Improve this Doc View Source

SetDestination(Vector3)

Declaration
public bool SetDestination(Vector3 target)
Parameters
Type Name Description
Vector3 target
Returns
Type Description
Boolean

SetLayerCost(Int32, Single)

Declaration
[Obsolete("Use SetAreaCost instead.")]
public void SetLayerCost(int layer, float cost)
Parameters
Type Name Description
Int32 layer
Single cost

SetPath(NavMeshPath)

Declaration
public bool SetPath(NavMeshPath path)
Parameters
Type Name Description
NavMeshPath path
Returns
Type Description
Boolean
| Improve this Doc View Source

Stop()

Declaration
[Obsolete("Set isStopped to true instead")]
public void Stop()
| Improve this Doc View Source

Stop(Boolean)

Declaration
[Obsolete("Set isStopped to true instead")]
public void Stop(bool stopUpdates)
Parameters
Type Name Description
Boolean stopUpdates
| Improve this Doc View Source

Warp(Vector3)

Declaration
public bool Warp(Vector3 newPosition)
Parameters
Type Name Description
Vector3 newPosition
Returns
Type Description
Boolean

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX