Adventure Creator
1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
|
Public Member Functions | |
virtual void | OnReset (NavigationMesh navMesh) |
Called when the scene begins or is reset. More... | |
virtual Vector3[] | GetPointsArray (Vector3 startPosition, Vector3 targetPosition, AC.Char _char=null) |
Calculates a path between two points. More... | |
Vector3[] | GetPointsArray (Vector3 startPosition, Vector3[] targetPositions, AC.Char _char=null) |
Calculates a path between multiple points. More... | |
virtual Vector3 | GetPointNear (Vector3 point, float minDistance, float maxDistance) |
Finds a random position surrounding a given point on a NavMesh. More... | |
virtual string | GetPrefabName () |
Gets the name of a "helper" prefab to list in the Scene Manager. More... | |
virtual void | TurnOn (NavigationMesh navMesh) |
Enables the NavMesh so that it can be used in pathfinding. More... | |
virtual void | ResetHoles (NavigationMesh navMesh) |
virtual void | SceneSettingsGUI () |
virtual NavigationMesh | NavigationMeshGUI (NavigationMesh _target) |
virtual void | DrawGizmos (GameObject navMeshOb) |
Draws gizmos in the Scene/Game window. More... | |
Public Attributes | |
bool | is2D = false |
Protected Attributes | |
Vector2[] | vertexData |
Properties | |
virtual bool | RequiresNavMeshGameObject [get] |
A base class for all navigation methods. Subclasses of this script are used to return a navigation path, as an array of Vector3s, based on two positions. A number of functions to allow easier integration within SceneManager are also included. To create a new navigation method, create a new subclass of this script with the name syntax "NavigationEngine_NewMethodName", and add "NewMethodName" to the AC_NavigationMethod enum in Enums.cs. The method will then be an option in the "Navigation engine" popup in the Scene Manager.
|
virtual |
Draws gizmos in the Scene/Game window.
navMeshOb | The NavigationMesh gameobject to draw gizmos for |
Reimplemented in AC.NavigationEngine_PolygonCollider.
|
virtual |
Finds a random position surrounding a given point on a NavMesh.
point | The given point on the NavMesh |
minDistance | The minimum distance between the given point and the random point |
maxDistance | The maximum distance between the given point and the random point |
Reimplemented in AC.NavigationEngine_PolygonCollider, AC.NavigationEngine_meshCollider, and AC.NavigationEngine_UnityNavigation.
|
virtual |
Calculates a path between two points.
startPosition | The start position |
targetPosition | The intended end position |
_char | The character (see Char) who this path is for (only used in PolygonCollider pathfinding) |
Reimplemented in AC.NavigationEngine_UnityNavigation, AC.NavigationEngine_meshCollider, and AC.NavigationEngine_PolygonCollider.
Vector3 [] AC.NavigationEngine.GetPointsArray | ( | Vector3 | startPosition, |
Vector3[] | targetPositions, | ||
AC.Char | _char = null |
||
) |
Calculates a path between multiple points.
startPosition | The start position |
targetPositions | An array of positions to travel through along the path, with the last entry being the intended destination |
_char | The character (see Char) who this path is for (only used in PolygonCollider pathfinding) |
|
virtual |
Gets the name of a "helper" prefab to list in the Scene Manager.
Reimplemented in AC.NavigationEngine_PolygonCollider, and AC.NavigationEngine_meshCollider.
|
virtual |
Provides a space for any custom Editor GUI code that should be displayed in the NavigationMesh inspector.
Reimplemented in AC.NavigationEngine_PolygonCollider.
|
virtual |
Called when the scene begins or is reset.
navMesh | The NavigationMesh that is active in the scene. |
Reimplemented in AC.NavigationEngine_PolygonCollider, and AC.NavigationEngine_meshCollider.
|
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 in AC.NavigationEngine_PolygonCollider, and AC.NavigationEngine_meshCollider.
|
virtual |
Provides a space for any custom Editor GUI code that should be displayed in SceneManager.
Reimplemented in AC.NavigationEngine_PolygonCollider, AC.NavigationEngine_meshCollider, and AC.NavigationEngine_UnityNavigation.
|
virtual |
Enables the NavMesh so that it can be used in pathfinding.
navMeshOb | The NavigationMesh gameobject to enable |
Reimplemented in AC.NavigationEngine_PolygonCollider, AC.NavigationEngine_meshCollider, and AC.NavigationEngine_UnityNavigation.
bool AC.NavigationEngine.is2D = false |
If True, then navigation raycasts performed by PlayerMovement will be done in 2D, rather than 3D
|
get |
Returns True if the engine relies on a specific GameObject for pathfinding