How can I add texture to Path2D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Suleymanov

Is there a way to add texture to Path2D so that it’s visible in play mode? For example, in play mode I want to have multiple arrows along Path2D to make the look pleasant.

:bust_in_silhouette: Reply From: kidscancode

A Path2D does not have any visual representation at all, so you can’t “add” a texture to it. It doesn’t even have a width.

You could use a Line2D, passing the points from the path to the line. Line2D has a texture property that it can use to fill the line.