How to use the debug line in the playmode?

Hi, i would like to use the debug trajectory (from one one seeker to its goal) in the playmode. For example, to tell the player wich path to follow in the dungeon to find its destination. Is this already implemented in the Pathfind asset ? If not, what could be the way to make it happen ? Thanks !


Currently, it is not implemented. However, you can easily do this by using the ai.GetRemainingPath method and drawing it yourself (e.g. using the ALINE package: ALINE - Drawing tools for Unity) or using a unity line renderer.

thanks for your feedback, i’ll try with aline. Cheers !

So, i tried with Aline and it works as you said.The thing is i would like the line to be hidden by the walls when it s behind walls. In my case, it s a dungeon crawler, and i would like the path to appear on the floor (which works), but be hidden by the walls. Is there something i can tweak to achieve this goal ?


You can adjust the opacity of lines behind solid objects in your Project Settings → ALINE panel.

i tried tweaking the values, but still the line is visible behind the walls.

That’s weird. Do you use some shader that doesn’t do z-writing or something?

I’m using URP pipeline, and the shader is URP /Lit. It s a shader from a synthy asset which has been updated by Unity when i moved to Urp.

by the way, i just added the Aline render to the urp asset, but it doesn’t solve the situation.
There 's no post process on the camera.

Here’s the shader of a wall, for example