Arakade
February 16, 2016, 10:59am
1
Hi,
Since tags only go up to 32 and often only 1 or 2 are used, one often wants them highly distinguished. May I advocate rather than using AstarMath.IntToColor(), it would be nicer to allow use of AstarColor.GetAreaColor() (which backs-off to the former if no colours are supplied).
Thanks, Rupert.
Base.cs.patch
diff --git "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Bas7CB4.tmp\\Base-25a36d5-left.cs" "b/D:\\Users\\User\\Dev\\Unity3D\\AIExperiments\\Assets\\AstarPathfindingProject\\Generators\\Base.cs"
index c530058..a8802b7 100644
--- "a/C:\\Users\\User\\AppData\\Local\\Temp\\TortoiseGit\\Bas7CB4.tmp\\Base-25a36d5-left.cs"
+++ "b/D:\\Users\\User\\Dev\\Unity3D\\AIExperiments\\Assets\\AstarPathfindingProject\\Generators\\Base.cs"
@@ -304,7 +304,7 @@ namespace Pathfinding {
c = Color.Lerp (AstarColor.ConnectionLowLerp,AstarColor.ConnectionHighLerp, ((float)node.Penalty-AstarPath.active.debugFloor) / (AstarPath.active.debugRoof-AstarPath.active.debugFloor));
break;
case GraphDebugMode.Tags:
- c = AstarMath.IntToColor ((int)node.Tag,0.5F);
+ c = AstarColor.GetAreaColor(node.Tag);
This file has been truncated. show original
1 Like
Thanks.
I will be including this in the next version.