Debug.DrawRaystatic function DrawRay (start : Vector3, dir : Vector3, color : Color = Color.white, duration : float = 0.0f, depthTest : boolean = true;) : voidDescriptionDraws a line from start to start + dir with color for a duration of time and with or without depth testing. If duration is 0 then the line is rendered 1 frame. The line will be drawn in the scene view of the editor. If gizmo drawing is enabled in the game view, the line will also be drawn there.
JavaScript
// Frame update example: Draws a 10 meter long green line from the position for 1 frame. using UnityEngine; import UnityEngine
JavaScript
using UnityEngine; import UnityEngine |
