• 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 AlchemyNavigationSystem

This class contains main logic of AlchemyNavigation system.

Inheritance
System.Object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
AlchemyNavigationSystem
Namespace: AlchemyBow.Navigation
Assembly: AlchemyBow.Navigation.dll
Syntax
public sealed class AlchemyNavigationSystem : MonoBehaviour
Remarks

This is strongly recommended to use AlchemyNavigation.Current.

Properties

| Improve this Doc View Source

Current

Gets the current initialized instance of AlchemyNavigationSystem or null.

Declaration
public static AlchemyNavigationSystem Current { get; }
Property Value
Type Description
AlchemyNavigationSystem

The current initialized instance of AlchemyNavigationSystem or null.

| Improve this Doc View Source

IsSurfaceActive

Determines whether there is the initialized instance of AlchemyNavigationSystem and its surface is available.

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

true if there is initialized instance of AlchemyNavigationSystem and its surface is available; otherwise, false.

| Improve this Doc View Source

IsSystemInitialized

Determines whether there is the initialized instance of AlchemyNavigationSystem.

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

true if there is the initialized instance of AlchemyNavigationSystem; otherwise, false.

| Improve this Doc View Source

Settings

Gets the settings used by the instance of AlchemyNavigationSystem.

Declaration
public NavigationSettings Settings { get; }
Property Value
Type Description
NavigationSettings

The settings used by the instance of AlchemyNavigationSystem.

Methods

| Improve this Doc View Source

ContainsFace(Int32, IImmutableFace)

Determines whether the system contains the specified face.

Declaration
public bool ContainsFace(int layer, IImmutableFace face)
Parameters
Type Name Description
System.Int32 layer

The index of the layer to check.

IImmutableFace face

The face to locate.

Returns
Type Description
System.Boolean

true if the surface is available and contains the specified face; otherwise, false.

Remarks

Use only when the surface is available.

| Improve this Doc View Source

CreatePathfindingRequest(Object, PathfindingRequest)

Schedules a PathfindingRequest.

Declaration
public void CreatePathfindingRequest(object requestorKey, PathfindingRequest request)
Parameters
Type Name Description
System.Object requestorKey

A unique identifier to distinguish requestors.

PathfindingRequest request

A request to schedule.

Remarks

If there are multiple requests from one requestor during one calculation circle, only the last request is calculated.

| Improve this Doc View Source

Raycast(Ray, Int32, Int32, out SurfaceImmutableRaycastHit)

Casts a ray against faces in the system and returns information on what was hit.

Declaration
public bool Raycast(Ray ray, int layer, int areaMask, out SurfaceImmutableRaycastHit result)
Parameters
Type Name Description
UnityEngine.Ray ray

The starting point and direction of the ray.

System.Int32 layer

The index of layer to check.

System.Int32 areaMask

An area mask that is used to selectively ignore faces when casting a ray.

SurfaceImmutableRaycastHit result

If true is returned, result will contain information about the hit.

Returns
Type Description
System.Boolean

true if the surface is available and the ray intersects any face; otherwise, false.

Remarks

Use only when the surface is available.

| Improve this Doc View Source

RegisterFace(Vector3, Vector3, Vector3, Int32, Int32)

Registers a face in the system.

Declaration
public NavigationFaceWrapper RegisterFace(Vector3 a, Vector3 b, Vector3 c, int areaIndex, int layerIndex)
Parameters
Type Name Description
UnityEngine.Vector3 a

Point a of the triangle.

UnityEngine.Vector3 b

Point b of the triangle.

UnityEngine.Vector3 c

Point c of the triangle.

System.Int32 areaIndex

Index of the area to which the triangle belongs.

System.Int32 layerIndex

Index of the layer to which the triangle belongs.

Returns
Type Description
NavigationFaceWrapper

The handle that can by used to unregister the face later.

Remarks

Does not provide validation. The programmer's job is to ensure the correctness of the added elements.

The face is not added, immediately.

Exceptions
Type Condition
System.Exception

Thrown when areaIndex or layerIndex are out of bounds.

| Improve this Doc View Source

UnregisterFace(NavigationFaceWrapper)

Unregisters the face from the system.

Declaration
public void UnregisterFace(NavigationFaceWrapper handle)
Parameters
Type Name Description
NavigationFaceWrapper handle

The unique face handle that was received during registration.

Remarks

The face is not removed, immediately.

Events

| Improve this Doc View Source

OnPathfindingFinished

Raised whenever the AlchemyNavigationSystem instance finishes pathfinding calculations.

Declaration
public static event NavigationAct OnPathfindingFinished
Event Type
Type Description
NavigationAct
| Improve this Doc View Source

OnSurfaceAvailable

Raised whenever the surface of the AlchemyNavigationSystem instance becomes available.

Declaration
public static event NavigationAct OnSurfaceAvailable
Event Type
Type Description
NavigationAct
| Improve this Doc View Source

OnSurfaceUnavailable

Raised whenever the surface of the AlchemyNavigationSystem instance becomes unavailable.

Declaration
public static event NavigationAct OnSurfaceUnavailable
Event Type
Type Description
NavigationAct
| Improve this Doc View Source

OnSystemDeinitialized

Raised whenever the AlchemyNavigationSystem instance is deinitialized.

Declaration
public static event NavigationAct OnSystemDeinitialized
Event Type
Type Description
NavigationAct
| Improve this Doc View Source

OnSystemInitialized

Raised whenever the AlchemyNavigationSystem instance is initialized.

Declaration
public static event NavigationAct OnSystemInitialized
Event Type
Type Description
NavigationAct
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX