A* Pathfinding Project  4.1.11
The A* Pathfinding Project for Unity 3D
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. More...
 
void Initialize ()
 Reads texture data. More...
 

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. More...
 

Private Attributes

Color32 [] data
 

Member Enumeration Documentation

◆ ChannelUse

enum ChannelUse
strong
Enumerator
None 
Penalty 
Position 
WalkablePenalty 

Member Function Documentation

◆ Apply()

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

Applies the texture to the node.

◆ ApplyChannel()

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.

◆ Initialize()

void Initialize ( )

Reads texture data.

Member Data Documentation

◆ channels

ChannelUse [] channels = new ChannelUse[3]

◆ data

Color32 [] data
private

◆ enabled

bool enabled

◆ factors

float [] factors = new float[3]

◆ source

Texture2D source

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