• Articles
  • Api Documentation
Show / Hide Table of Contents
  • AlchemyBow.Navigation
    • AlchemyNavigationSystem
    • BasicAgent
    • FacesHolder
    • NavigationAct
    • NavigationFaceWrapper
    • NavigationInfo
    • PathfindingRequest
    • PathfindingRequest.PathType
    • PathfindingRequest.Status
  • AlchemyBow.Navigation.BackgroundProcessing
    • BackgroundProcessor
    • BackgroundProcessor.States
    • BuildingProcess
    • IBackgroundCommand
    • PathfindingProcess
    • RegisterFaceCommand
    • UnregisterFaceCommand
  • AlchemyBow.Navigation.Collections
    • OrderedSet<T>
    • OrderedSetNode<T>
    • OrderedSetRangeComparer<T>
  • AlchemyBow.Navigation.DebugUnits
    • AlchemyNavigationSystemDebugUnit
    • CompositeSurfaceDrawer
    • GizmosSurfaceDrawer
    • ISurfaceDrawer
    • MinimalGizmosSurfaceDrawer
  • AlchemyBow.Navigation.HighLevel
    • MeshBasedBake
    • MeshBasedBakeGroup
    • MeshBasedBakeSettings
    • WorldMesh
  • AlchemyBow.Navigation.PropertyAttributes
    • AreaIndexAttribute
    • AreaMaskAttribute
    • LayerIndexAttribute
  • AlchemyBow.Navigation.Settings
    • AlchemyNavigationSettingsPreset
    • NavigationAreaSettings
    • NavigationLayerSettings
    • NavigationSettings
  • AlchemyBow.Navigation.Simple
    • SimpleAgent
  • AlchemyBow.Navigation.Simple.Elements
    • AvoidanceGroup
    • AvoidanceModifier
    • CachedFace
    • ISteeredBehaviour
    • MovementModifier
    • PathProgress
  • AlchemyBow.Navigation.Surfaces
    • Edge
    • Face
    • FacesByMagnitudeRangeComparer
    • NavigationSurface
    • SurfaceRaycastHit
    • Usage<TUser>
    • UsageTrackingObject<TUser>
    • Vertex
    • VertexByPositionComparer
  • AlchemyBow.Navigation.Surfaces.SafeAccess
    • IImmutableFace
    • SurfaceImmutableRaycastHit
  • AlchemyBow.Navigation.Utilities
    • ChannelUnwrapper
    • FaceAStar
    • FaceStarUnit
    • Funnel
    • ICommand

Class BasicAgent

Describes an abstract unit to handle pathfinding requests and communice with AlchemyNavigationSystem.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
BasicAgent
SimpleAgent
Namespace: AlchemyBow.Navigation
Assembly: AlchemyBow.Navigation.dll
Syntax
public abstract class BasicAgent : MonoBehaviour

Properties

| Improve this Doc View Source

AreaMask

Gets or sets the area mask of the agent.

Declaration
public int AreaMask { get; set; }
Property Value
Type Description
System.Int32

The area mask of the agent.

Remarks

If set value is changed, OnAreaMaskChanged() is called.

| Improve this Doc View Source

HasDestination

Determines whether the agent has destination.

Declaration
public bool HasDestination { get; }
Property Value
Type Description
System.Boolean

true if the agent has destination; otherwise, false.

| Improve this Doc View Source

HasPendingRequests

Determines whether the agent has pending requests.

Declaration
protected bool HasPendingRequests { get; }
Property Value
Type Description
System.Boolean

true if the agent pending requests; otherwise, false.

| Improve this Doc View Source

IsPathWalking

Determines whether the agent is walking along the path.

Declaration
protected abstract bool IsPathWalking { get; }
Property Value
Type Description
System.Boolean

true if the agent is walking along the path.

| Improve this Doc View Source

Layer

Gets or sets the target layer of the agent.

Declaration
public int Layer { get; set; }
Property Value
Type Description
System.Int32

The target layer of the agent.

Remarks

If set value is changed, OnLayerChanged() is called.

| Improve this Doc View Source

Radius

Defines how close the agent center can get to edges of the navigation mesh.

Declaration
public float Radius { get; }
Property Value
Type Description
System.Single

The radius of the agent.

Methods

| Improve this Doc View Source

CancelAllRequests()

Cancels all requested path calculations.

Declaration
public void CancelAllRequests()
| Improve this Doc View Source

OnAgentDisable()

Called when the agent becomes disabled or inactive.

Declaration
protected abstract void OnAgentDisable()
| Improve this Doc View Source

OnAgentEnable()

Called when the agent becomes enabled and active.

Declaration
protected abstract void OnAgentEnable()
| Improve this Doc View Source

OnAreaMaskChanged()

Called when the area mask property is changed.

Declaration
protected abstract void OnAreaMaskChanged()
| Improve this Doc View Source

OnConnectionWithSystemLost()

Called when the system is deinitialized.

Declaration
protected virtual void OnConnectionWithSystemLost()
Remarks

By default, sets the agent's game object inactive.

| Improve this Doc View Source

OnLayerChanged()

Called when the layer property is changed.

Declaration
protected abstract void OnLayerChanged()
| Improve this Doc View Source

OnPath(Vector3[], IImmutableFace[])

Called when one of the requested paths is calculated.

Declaration
protected abstract void OnPath(Vector3[] path, IImmutableFace[] facePath)
Parameters
Type Name Description
UnityEngine.Vector3[] path

The calculated path consisting of waypoints.

IImmutableFace[] facePath

The calculated path consisting of faces.

| Improve this Doc View Source

OnRequestsCanceled()

Called when requests are canceled.

Declaration
protected abstract void OnRequestsCanceled()
| Improve this Doc View Source

OnSurfaceAvailable(PathfindingRequest)

Called when the surface becomes available.

Declaration
protected abstract void OnSurfaceAvailable(PathfindingRequest delayedRequest)
Parameters
Type Name Description
PathfindingRequest delayedRequest

A request that was delayed until surface becomes available.

| Improve this Doc View Source

RequestPath(Vector3, Vector3, PathfindingRequest.PathType, IImmutableFace)

Schedules the path calculation.

Declaration
protected void RequestPath(Vector3 start, Vector3 destination, PathfindingRequest.PathType pathType, IImmutableFace startFace = null)
Parameters
Type Name Description
UnityEngine.Vector3 start

The start point of a path.

UnityEngine.Vector3 destination

The end point of a path.

PathfindingRequest.PathType pathType

The target type of a path.

IImmutableFace startFace

(optional) The start face of the path.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX