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

Used for using a texture as a source for a grid graph. More...

Detailed Description

Used for using a texture as a source for a grid graph.

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

Public Types

enum  ChannelUse { None, Penalty, Position, WalkablePenalty }
 

Public Member Functions

void Apply (GridNode node, int x, int z)
 Applies the texture to the node.
 
void Initialize ()
 Reads texture data.
 

Public Attributes

ChannelUse[] channels = new ChannelUse[3]
 
bool enabled
 
float[] factors = new float[3]
 
Texture2D source
 

Private Member Functions

void ApplyChannel (GridNode node, int x, int z, int value, ChannelUse channelUse, float factor)
 Applies a value to the node using the specified ChannelUse.
 

Private Attributes

Color32[] data
 

Member Enumeration Documentation

enum ChannelUse
Enumerator:
None 
Penalty 
Position 
WalkablePenalty 

Member Function Documentation

void Apply ( GridNode  node,
int  x,
int  z 
)

Applies the texture to the node.

void ApplyChannel ( GridNode  node,
int  x,
int  z,
int  value,
ChannelUse  channelUse,
float  factor 
)
private

Applies a value to the node using the specified ChannelUse.

void Initialize ( )

Reads texture data.

Member Data Documentation

ChannelUse [] channels = new ChannelUse[3]
Color32 [] data
private
bool enabled
float [] factors = new float[3]
Texture2D source

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