Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
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>()
 
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 Awake ()
 
void OnDrawGizmos ()
 
void OnDrawGizmosSelected ()
 
void DrawGizmos ()
 
- Protected Member Functions inherited from AC.NavMeshBase
void BaseAwake ()
 

Protected Attributes

Vector3 upDirection = new Vector3 (0f, 1f, 0f)
 
PolygonCollider2D[] polygonCollider2Ds
 
int originalPathCount = -1
 

Properties

PolygonCollider2D[] PolygonCollider2Ds [get]
 
Vector3 UpDirection [get, set]
 
int? OriginalPathCount [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

Property Documentation

◆ OriginalPathCount

int? AC.NavigationMesh.OriginalPathCount
get

The number of paths baked into the first-attached PolygonCollider component

◆ PolygonCollider2Ds

PolygonCollider2D [] AC.NavigationMesh.PolygonCollider2Ds
get

All PolygonCollider2D components attached to the GameObject

◆ UpDirection

Vector3 AC.NavigationMesh.UpDirection
getset

The direction that is considered 'up'. This is only used by the MeshCollider navigation engine.