Is there any way to get Debug.DrawLine() to display in the game view without other gizmos?

Hi

I have a (relatively small and totally work-aroundable) problem, but I'm just wondering if there's a simple check I can do to fix it...

I want the lines rendered by Debug.DrawLine() to appear in the Game view. Simple. Press the Gizmo button on the game view and they display...

The problem is that all the gizmos (mostly object setup related) I have then also render and get in the way of what I'm trying to see when I use Debug.DrawLine().

Is there any way to:

a) cause Debug.DrawLine to render in the game view without the Gizmo button turned on?

b) check which view (scene or game) is active so I can not render the gizmos in the game view?

cheers,

darbotron

You can use LineRenderer to render lines. Then you can check Application.isEditor and only draw during that condition.

The editor doesn't really have any options for what you're trying to accomplish so it's going to have to be custom made.

You can check if you're running in the editor with Application.platform. I don't think you can turn on Debug.DrawLine separately, but you could draw your lines with another method that works in game.