A* Pathfinding Project  3.8
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 CalculateConstantPath ()
 
void OnGUI ()
 Draw some helpful gui.
 
void OnPathComplete (Path p)
 Get the path back.
 

Public Attributes

DemoMode activeDemo = DemoMode.ABPath
 
RichAI[] agents
 
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.
 
void DemoPath ()
 Starts a path specified by PathTypesDemo.activeDemo.
 
void OnApplicationQuit ()
 Clears renders on application quit.
 
void Update ()
 

Private Attributes

FloodPath lastFlood = null
 
Path lastPath = null
 
List< GameObject > lastRender = new List<GameObject>()
 
Vector2 mouseDragStart
 
float mouseDragStartTime
 
List< Vector3 > multipoints = new List<Vector3>()
 

Member Enumeration Documentation

enum DemoMode
Enumerator:
ABPath 
MultiTargetPath 
RandomPath 
FleePath 
ConstantPath 
FloodPath 
FloodPathTracer 

Member Function Documentation

IEnumerator CalculateConstantPath ( )
void ClearPrevious ( )
private

Destroys all previous render objects.

void DemoPath ( )
private

Starts a path specified by PathTypesDemo.activeDemo.

void OnApplicationQuit ( )
private

Clears renders on application quit.

void OnGUI ( )

Draw some helpful gui.

void OnPathComplete ( Path  p)

Get the path back.

void Update ( )
private

Member Data Documentation

DemoMode activeDemo = DemoMode.ABPath
RichAI [] agents
float aimStrength = 0
Transform end

Target point of paths.

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

Material used for rendering paths.

float lineWidth
Vector2 mouseDragStart
private
float mouseDragStartTime
private
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: