A* Pathfinding Project  4.1.11
The A* Pathfinding Project for Unity 3D
AstarColor Class Reference

Stores editor colors. More...

Detailed Description

Stores editor colors.

Public Member Functions

 AstarColor ()
 
void OnEnable ()
 Pushes all local variables out to static ones. More...
 

Static Public Member Functions

static Color GetAreaColor (uint area)
 Returns an color for an area, uses both user set ones and calculated. More...
 

Public Attributes

Color [] _AreaColors
 Holds user set area colors. More...
 
Color _BoundsHandles
 
Color _ConnectionHighLerp
 
Color _ConnectionLowLerp
 
Color _MeshEdgeColor
 
Color _NodeConnection
 
Color _UnwalkableNode
 

Static Public Attributes

static Color BoundsHandles = new Color(0.29F, 0.454F, 0.741F, 0.9F)
 
static Color ConnectionHighLerp = new Color(1, 0, 0, 0.5F)
 
static Color ConnectionLowLerp = new Color(0, 1, 0, 0.5F)
 
static Color MeshEdgeColor = new Color(0, 0, 0, 0.5F)
 
static Color NodeConnection = new Color(1, 1, 1, 0.9F)
 
static Color UnwalkableNode = new Color(1, 0, 0, 0.5F)
 

Static Private Attributes

static Color [] AreaColors
 Holds user set area colors. More...
 

Constructor & Destructor Documentation

◆ AstarColor()

Member Function Documentation

◆ GetAreaColor()

static Color GetAreaColor ( uint  area)
static

Returns an color for an area, uses both user set ones and calculated.

If the user has set a color for the area, it is used, but otherwise the color is calculated using Mathfx.IntToColor

See also
AreaColors

◆ OnEnable()

void OnEnable ( )

Pushes all local variables out to static ones.

This is done because that makes it so much easier to access the colors during Gizmo rendering and it has a positive performance impact as well (gizmo rendering is hot code).

Member Data Documentation

◆ _AreaColors

Color [] _AreaColors

Holds user set area colors.

Use GetAreaColor to get an area color

◆ _BoundsHandles

Color _BoundsHandles

◆ _ConnectionHighLerp

Color _ConnectionHighLerp

◆ _ConnectionLowLerp

Color _ConnectionLowLerp

◆ _MeshEdgeColor

Color _MeshEdgeColor

◆ _NodeConnection

Color _NodeConnection

◆ _UnwalkableNode

Color _UnwalkableNode

◆ AreaColors

Color [] AreaColors
staticprivate

Holds user set area colors.

Use GetAreaColor to get an area color

◆ BoundsHandles

Color BoundsHandles = new Color(0.29F, 0.454F, 0.741F, 0.9F)
static

◆ ConnectionHighLerp

Color ConnectionHighLerp = new Color(1, 0, 0, 0.5F)
static

◆ ConnectionLowLerp

Color ConnectionLowLerp = new Color(0, 1, 0, 0.5F)
static

◆ MeshEdgeColor

Color MeshEdgeColor = new Color(0, 0, 0, 0.5F)
static

◆ NodeConnection

Color NodeConnection = new Color(1, 1, 1, 0.9F)
static

◆ UnwalkableNode

Color UnwalkableNode = new Color(1, 0, 0, 0.5F)
static

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