C# Класс UnityEngine.AI.NavMeshAgent

Наследование: UnityEngine.Behaviour
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ActivateCurrentOffMeshLink void
CalculatePathInternal bool
CompleteOffMeshLink void
CopyPathTo void
FindClosestEdge bool
GetAreaCost float
GetCurrentOffMeshLinkDataInternal OffMeshLinkData
GetLayerCost float
GetNextOffMeshLinkDataInternal OffMeshLinkData
INTERNAL_CALL_CalculatePathInternal bool
INTERNAL_CALL_Move void
INTERNAL_CALL_Raycast bool
INTERNAL_CALL_SetDestination bool
INTERNAL_CALL_Warp bool
INTERNAL_get_desiredVelocity void
INTERNAL_get_destination void
INTERNAL_get_nextPosition void
INTERNAL_get_pathEndPosition void
INTERNAL_get_steeringTarget void
INTERNAL_get_velocity void
INTERNAL_set_destination void
INTERNAL_set_nextPosition void
INTERNAL_set_velocity void
ResetPath void
Resume void
SamplePathPosition bool
SetAreaCost void
SetLayerCost void
SetPath bool
Stop void
StopInternal void

Открытые методы

Метод Описание
CalculatePath ( Vector3 targetPosition, NavMeshPath path ) : bool

Calculate a path to a specified point and store the resulting path.

Move ( Vector3 offset ) : void

Apply relative movement to current position.

Raycast ( Vector3 targetPosition, NavMeshHit &hit ) : bool
SetDestination ( Vector3 target ) : bool

Sets or updates the destination thus triggering the calculation for a new path.

Stop ( ) : void

Stop movement of this agent along its current path.

Warp ( Vector3 newPosition ) : bool

Warps agent to the provided position.

Приватные методы

Метод Описание
ActivateCurrentOffMeshLink ( bool activated ) : void
CalculatePathInternal ( Vector3 targetPosition, NavMeshPath path ) : bool
CompleteOffMeshLink ( ) : void
CopyPathTo ( NavMeshPath path ) : void
FindClosestEdge ( NavMeshHit &hit ) : bool
GetAreaCost ( int areaIndex ) : float
GetCurrentOffMeshLinkDataInternal ( ) : OffMeshLinkData
GetLayerCost ( int layer ) : float
GetNextOffMeshLinkDataInternal ( ) : OffMeshLinkData
INTERNAL_CALL_CalculatePathInternal ( NavMeshAgent self, Vector3 &targetPosition, NavMeshPath path ) : bool
INTERNAL_CALL_Move ( NavMeshAgent self, Vector3 &offset ) : void
INTERNAL_CALL_Raycast ( NavMeshAgent self, Vector3 &targetPosition, NavMeshHit &hit ) : bool
INTERNAL_CALL_SetDestination ( NavMeshAgent self, Vector3 &target ) : bool
INTERNAL_CALL_Warp ( NavMeshAgent self, Vector3 &newPosition ) : bool
INTERNAL_get_desiredVelocity ( Vector3 &value ) : void
INTERNAL_get_destination ( Vector3 &value ) : void
INTERNAL_get_nextPosition ( Vector3 &value ) : void
INTERNAL_get_pathEndPosition ( Vector3 &value ) : void
INTERNAL_get_steeringTarget ( Vector3 &value ) : void
INTERNAL_get_velocity ( Vector3 &value ) : void
INTERNAL_set_destination ( Vector3 &value ) : void
INTERNAL_set_nextPosition ( Vector3 &value ) : void
INTERNAL_set_velocity ( Vector3 &value ) : void
ResetPath ( ) : void
Resume ( ) : void
SamplePathPosition ( int areaMask, float maxDistance, NavMeshHit &hit ) : bool
SetAreaCost ( int areaIndex, float areaCost ) : void
SetLayerCost ( int layer, float cost ) : void
SetPath ( NavMeshPath path ) : bool
Stop ( bool stopUpdates ) : void
StopInternal ( ) : void

Описание методов

CalculatePath() публичный Метод

Calculate a path to a specified point and store the resulting path.

public CalculatePath ( Vector3 targetPosition, NavMeshPath path ) : bool
targetPosition Vector3 The final position of the path requested.
path UnityEngine.NavMeshPath The resulting path.
Результат bool

Move() публичный Метод

Apply relative movement to current position.

public Move ( Vector3 offset ) : void
offset Vector3 The relative movement vector.
Результат void

Raycast() публичный Метод

public Raycast ( Vector3 targetPosition, NavMeshHit &hit ) : bool
targetPosition Vector3
hit NavMeshHit
Результат bool

SetDestination() публичный Метод

Sets or updates the destination thus triggering the calculation for a new path.

public SetDestination ( Vector3 target ) : bool
target Vector3 The target point to navigate to.
Результат bool

Stop() публичный Метод

Stop movement of this agent along its current path.

public Stop ( ) : void
Результат void

Warp() публичный Метод

Warps agent to the provided position.

public Warp ( Vector3 newPosition ) : bool
newPosition Vector3 New position to warp the agent to.
Результат bool