Forum rules - please read before posting.

NavMesh colour

Hi there,

My game is in black and white, and by default the NavMesh is white.  Therefore it is impossible to see where the NavMesh goes without selecting it.  It also means it isn't usable when testing the game with Gizmos enabled.

Currently the workaround I have is to tint all my backgrounds red, but that is a bit frustrating as I can't test my game as it would actually look, plus I have to be careful to remember to remove all this colouring if I want to build the game for anyone else to look at.

Is there a way to change the colour of an unselected NavMesh?  If not, is this a feature you would consider adding?

Kind regards,

- Mark

Comments

  • Which pathfinding engine are you using, as set at the top of the Scene Manager?  It could be a simple code tweak to change the colour, but it'll depend on which navmesh algorithm you're making use of.
  • Hi Chris - thanks for the quick reply.

    Pathfinding method is set to "Polygon Collider".  I'm not yet clear on the differences between the methods (a bit of reading-up to do, I think) but this was the one recommended by the tutorial I was following.

    - Mark
  • I'll consider making this an editable Inspector field, but you can change the colour via line 801 in the NavigationEngine_PolygonCollider.cs script.  Replace "Color.white" with the Unity color type of your choice.
  • Perfect!  Thank you!

    This raises another question about upgrading, but I will ask that separately.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.