A* Pathfinding Project  4.1.2
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
PathTypesDemo Class Reference

Demos different path types. More...

Detailed Description

Demos different path types.

This script is an example script demoing a number of different path types included in the project. Since only the Pro version has access to many path types, it is only included in the pro version

A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here
See Also
Pathfinding.ABPath
Pathfinding.MultiTargetPath
Pathfinding.ConstantPath
Pathfinding.FleePath
Pathfinding.RandomPath
Pathfinding.FloodPath
Pathfinding.FloodPathTracer

Public Types

enum  DemoMode {
  ABPath, MultiTargetPath, RandomPath, FleePath,
  ConstantPath, FloodPath, FloodPathTracer
}
 

Public Member Functions

IEnumerator DemoConstantPath ()
 
void OnGUI ()
 Draw some helpful gui.
 
void OnPathComplete (Path p)
 Will be called when the paths have been calculated.
 

Public Attributes

DemoMode activeDemo = DemoMode.ABPath
 
float aimStrength = 0
 
Transform end
 Target point of paths.
 
Material lineMat
 Material used for rendering paths.
 
float lineWidth
 
Vector3 pathOffset
 Offset from the real path to where it is rendered.
 
int searchLength = 1000
 
int spread = 100
 
Material squareMat
 Material used for rendering result of the ConstantPath.
 
Transform start
 Start of paths.
 

Private Member Functions

void ClearPrevious ()
 Destroys all previous render objects.
 
IEnumerator DemoMultiTargetPath ()
 
void DemoPath ()
 Starts a path specified by PathTypesDemo.activeDemo.
 
void OnDestroy ()
 Clears renders when the object is destroyed.
 
void Update ()
 

Private Attributes

FloodPath lastFloodPath = null
 
Path lastPath = null
 
List< GameObject > lastRender = new List<GameObject>()
 
List< Vector3 > multipoints = new List<Vector3>()
 

Member Enumeration Documentation

enum DemoMode
Enumerator:
ABPath 
MultiTargetPath 
RandomPath 
FleePath 
ConstantPath 
FloodPath 
FloodPathTracer 

Member Function Documentation

void ClearPrevious ( )
private

Destroys all previous render objects.

IEnumerator DemoConstantPath ( )
IEnumerator DemoMultiTargetPath ( )
private
void DemoPath ( )
private

Starts a path specified by PathTypesDemo.activeDemo.

void OnDestroy ( )
private

Clears renders when the object is destroyed.

void OnGUI ( )

Draw some helpful gui.

void OnPathComplete ( Path  p)

Will be called when the paths have been calculated.

void Update ( )
private

Member Data Documentation

DemoMode activeDemo = DemoMode.ABPath
float aimStrength = 0
Transform end

Target point of paths.

FloodPath lastFloodPath = null
private
Path lastPath = null
private
List<GameObject> lastRender = new List<GameObject>()
private
Material lineMat

Material used for rendering paths.

float lineWidth
List<Vector3> multipoints = new List<Vector3>()
private
Vector3 pathOffset

Offset from the real path to where it is rendered.

Used to avoid z-fighting

int searchLength = 1000
int spread = 100
Material squareMat

Material used for rendering result of the ConstantPath.

Transform start

Start of paths.


The documentation for this class was generated from the following file: