`Debug.DrawRay()` is documented as only working in the SceneView and GameView if you have gizmos. It is not intended to be a general-purpose line renderer, hence belonging to `Debug` class. Try:
http://docs.unity3d.com/ScriptReference/GL.html
for a general purpose line renderer.
↧