Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.NavigationMesh Class Reference
Inheritance diagram for AC.NavigationMesh:
AC.NavMeshBase

Public Member Functions

void AddHole (PolygonCollider2D newHole)
 Integrates a PolygonCollider2D into the shape of the base PolygonCollider2D. If the shape of the new PolygonCollider2D is within the boundary of the base PolygonCollider2D, then the shape will effectively be subtracted. If the shape is instead outside the boundary of the base and overlaps, then the two shapes will effectively be combined. More...
 
void RemoveHole (PolygonCollider2D oldHole)
 Removes the effects of a PolygonCollider2D on the shape of the base PolygonCollider2D. This function will only have an effect if the PolygonCollider2D was previously added, using AddHole().</sumary>

Parameters
oldHoleThe new PolygonCollider2D to remove

 
void TurnOn ()
 
void TurnOff ()
 
- Public Member Functions inherited from AC.NavMeshBase
void Hide ()
 
void Show ()
 
void IgnoreNavMeshCollisions (Collider[] allColliders=null)
 

Public Attributes

List< PolygonCollider2D > polygonColliderHoles = new List<PolygonCollider2D>()
 
bool showInEditor = true
 
CharacterEvasion characterEvasion = CharacterEvasion.OnlyStationaryCharacters
 
CharacterEvasionPoints characterEvasionPoints = CharacterEvasionPoints.Four
 
float characterEvasionYScale = 1f
 
float accuracy = 1f
 
Color gizmoColour = Color.white
 
- Public Attributes inherited from AC.NavMeshBase
bool disableRenderer = true
 
bool ignoreCollisions = true
 

Protected Member Functions

void OnDrawGizmos ()
 
void OnDrawGizmosSelected ()
 
- Protected Member Functions inherited from AC.NavMeshBase
void BaseAwake ()
 

Properties

PolygonCollider2D [] PolygonCollider2Ds [get]
 
- Properties inherited from AC.NavMeshBase
Collider Collider [get]
 

Detailed Description

Defines a walkable area of AC's built-in pathfinding algorithms.

Member Function Documentation

◆ AddHole()

void AC.NavigationMesh.AddHole ( PolygonCollider2D  newHole)

Integrates a PolygonCollider2D into the shape of the base PolygonCollider2D. If the shape of the new PolygonCollider2D is within the boundary of the base PolygonCollider2D, then the shape will effectively be subtracted. If the shape is instead outside the boundary of the base and overlaps, then the two shapes will effectively be combined.

Parameters
newHoleThe new PolygonCollider2D to integrate

◆ TurnOff()

void AC.NavigationMesh.TurnOff ( )

Disables the GameObject from being used in pathfinding.

◆ TurnOn()

void AC.NavigationMesh.TurnOn ( )

Enables the GameObject so that it can be used in pathfinding.

Member Data Documentation

◆ accuracy

float AC.NavigationMesh.accuracy = 1f

A float that can be used as an accuracy parameter, should the algorithm require one

◆ characterEvasion

CharacterEvasion AC.NavigationMesh.characterEvasion = CharacterEvasion.OnlyStationaryCharacters

The condition for which dynamic 2D pathfinding can occur by generating holes around characters (None, OnlyStationaryCharacters, AllCharacters

◆ characterEvasionPoints

CharacterEvasionPoints AC.NavigationMesh.characterEvasionPoints = CharacterEvasionPoints.Four

The number of vertices created around characters to evade (Four, Eight, Sixteen). Higher values mean greater accuracy.

◆ characterEvasionYScale

float AC.NavigationMesh.characterEvasionYScale = 1f

The scale of generated character evasion 'holes' in the NavMesh in the y-axis, relative to the x-axis.

◆ gizmoColour

Color AC.NavigationMesh.gizmoColour = Color.white

The colour of its Gizmo when used for 2D polygons

◆ polygonColliderHoles

List<PolygonCollider2D> AC.NavigationMesh.polygonColliderHoles = new List<PolygonCollider2D>()

A List of holes within the base PolygonCollider2D

◆ showInEditor

bool AC.NavigationMesh.showInEditor = true

If True, the boundary will be drawn in the Scene window (Polygon Collider-based navigation only)