How can I create debug lines in the editor with a tool scripts

Godot Version

4.6.beta2

Question

I would like to draw certain debug related things in the editor view when making stuff. For this case, I want to create the lines that show up when a TileMapLayer is highlighted

How would one draw debug lines editor?

More generally, how would one go about creating such debug related drawings in the editor?

You can use custom drawing functions on any canvas item node.

1 Like

Ah thanks, I came across it from some other forum pages about the _draw() function, but it was not clear to me it could be used for this. Guess I looked for the wrong things.

1 Like