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

Public Member Functions

override void OnReset (NavigationMesh navMesh)
 Called when the scene begins or is reset. More...
 
override void TurnOn (NavigationMesh navMesh)
 Enables the NavMesh so that it can be used in pathfinding. More...
 
override Vector3 [] GetPointsArray (Vector3 _originPos, Vector3 _targetPos, AC.Char _char=null)
 Calculates a path between two points. More...
 
override void ResetHoles (NavigationMesh navMesh)
 
override Vector3 GetPointNear (Vector3 point, float minDistance, float maxDistance)
 Finds a random position surrounding a given point on a NavMesh. More...
 
override string GetPrefabName ()
 Gets the name of a "helper" prefab to list in the Scene Manager. More...
 
override void SetVisibility (bool visibility)
 Sets the visibility state of any relevant prefabs. This is called when the "NavMesh" visibility buttons in SceneManager are clicked on. More...
 
override void SceneSettingsGUI ()
 
override NavigationMesh NavigationMeshGUI (NavigationMesh _target)
 
override void DrawGizmos (GameObject navMeshOb)
 Draws gizmos in the Scene/Game window. More...
 

Static Public Attributes

static Collider2D [] results = new Collider2D[1]
 

Additional Inherited Members

- Public Attributes inherited from AC.NavigationEngine
bool is2D = false
 
- Protected Attributes inherited from AC.NavigationEngine
Vector2 [] vertexData
 

Member Function Documentation

◆ DrawGizmos()

override void AC.NavigationEngine_PolygonCollider.DrawGizmos ( GameObject  navMeshOb)
virtual

Draws gizmos in the Scene/Game window.

Parameters
navMeshObThe NavigationMesh gameobject to draw gizmos for

Reimplemented from AC.NavigationEngine.

◆ GetPointNear()

override Vector3 AC.NavigationEngine_PolygonCollider.GetPointNear ( Vector3  point,
float  minDistance,
float  maxDistance 
)
virtual

Finds a random position surrounding a given point on a NavMesh.

Parameters
pointThe given point on the NavMesh
minDistanceThe minimum distance between the given point and the random point
maxDistanceThe maximum distance between the given point and the random point
Returns
A random position surrounding the given point. If a suitable point is not found, the original point will be returned.

Reimplemented from AC.NavigationEngine.

◆ GetPointsArray()

override Vector3 [] AC.NavigationEngine_PolygonCollider.GetPointsArray ( Vector3  startPosition,
Vector3  targetPosition,
AC.Char  _char = null 
)
virtual

Calculates a path between two points.

Parameters
startPositionThe start position
targetPositionThe indended end position
_charThe character (see Char) who this path is for (only used in PolygonCollider pathfinding)
Returns
The path to take, as an array of Vector3s.

Reimplemented from AC.NavigationEngine.

◆ GetPrefabName()

override string AC.NavigationEngine_PolygonCollider.GetPrefabName ( )
virtual

Gets the name of a "helper" prefab to list in the Scene Manager.

Returns
The name of the prefab to list in SceneManager. The prefab must be placed in the Assets/AdventureCreator/Prefabs/Navigation folder. If nothing is returned, no prefab will be listed.

Reimplemented from AC.NavigationEngine.

◆ NavigationMeshGUI()

override NavigationMesh AC.NavigationEngine_PolygonCollider.NavigationMeshGUI ( NavigationMesh  _target)
virtual

Provides a space for any custom Editor GUI code that should be displayed in the NavigationMesh inspector.

Reimplemented from AC.NavigationEngine.

◆ OnReset()

override void AC.NavigationEngine_PolygonCollider.OnReset ( NavigationMesh  navMesh)
virtual

Called when the scene begins or is reset.

Parameters
navMeshThe NavigationMesh that is active in the scene.

Reimplemented from AC.NavigationEngine.

◆ ResetHoles()

override void AC.NavigationEngine_PolygonCollider.ResetHoles ( NavigationMesh  navMesh)
virtual

Integrates all PolygonCollider2D objects in the polygonColliderHoles List into the base PolygonCollider2D shape. This is called automatically by AddHole() and RemoveHole() once the List has been amended

Reimplemented from AC.NavigationEngine.

◆ SceneSettingsGUI()

override void AC.NavigationEngine_PolygonCollider.SceneSettingsGUI ( )
virtual

Provides a space for any custom Editor GUI code that should be displayed in SceneManager.

Reimplemented from AC.NavigationEngine.

◆ SetVisibility()

override void AC.NavigationEngine_PolygonCollider.SetVisibility ( bool  visibility)
virtual

Sets the visibility state of any relevant prefabs. This is called when the "NavMesh" visibility buttons in SceneManager are clicked on.

Parameters
visibilityTrue if the prefabs should be made visible. Otherwise, they should be made invisible.

Reimplemented from AC.NavigationEngine.

◆ TurnOn()

override void AC.NavigationEngine_PolygonCollider.TurnOn ( NavigationMesh  navMesh)
virtual

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

Parameters
navMeshObThe NavigationMesh gameobject to enable

Reimplemented from AC.NavigationEngine.