petea
1
Tell me how to draw the line on the screen, I checked not working?
console shows not error.
#pragma strict
function Start () {
Debug.DrawLine (Vector3.zero, new Vector3 (0, 10000, 0), Color.red);
}
function Update () {
Debug.DrawLine (Vector3.zero, new Vector3 (10000, 1, 0), Color.green);
Debug.DrawLine (Vector3.zero, new Vector3 (1, 0, 10000), Color.green);
Debug.DrawLine (Vector3.zero, new Vector3 (0, 10000, 1), Color.green);
}
Debug function are only visible in the SceneView, not in game. Is it what you want?
jabez
3
Try
function OnDrawGizmosSelected () {
Debug.DrawLine (Vector3.zero, new Vector3 (10000, 1, 0), Color.green);
}
petea
5
I need to build the cube of the lines and track the mouse coordinates inside the cube.
petea
6
no no i`m work in javascript
petea
7
no not work
#pragma strict
function Start () {
OnDrawGizmosSelected();
}
function OnDrawGizmosSelected () {
Debug.DrawLine (Vector3.zero, new Vector3 (10000, 1, 0), Color.green);
}
function Update () {
}