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

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

+ Inheritance diagram for GridGraph.TextureData:
+ Collaboration diagram for GridGraph.TextureData:

Public Types

enum  ChannelUse { None, Penalty, Position, WalkablePenalty }
 

Public Member Functions

void Apply (Node node, int x, int z)
 Applies the texture to the node.
 
void DeSerializeSettings (AstarSerializer serializer)
 
void Initialize ()
 Reads texture data.
 
void SerializeSettings (AstarSerializer serializer)
 
- Public Member Functions inherited from ISerializableObject
void DeSerializeSettings (AstarSerializer serializer)
 Called to deserialize the object.
 
void SerializeSettings (AstarSerializer serializer)
 Called to serialize the object.
 

Public Attributes

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

Private Member Functions

void ApplyChannel (Node 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 = null
 

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
Warning
Can only be used with Unity 3.4 and up

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