How do you show raycasts in the editor?

Rasmus Jürs 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 2

I cant seeme to find a way to show the raycasts in the editor? Am i missing something?

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

you can use Gizmos.DrawLine

Only in editor:


Nice solution Erin!

You could also use Debug: Draw Ray or Debug: Draw Line, these don't need to be in OnDrawGizmos, they can be anywhere.