UnityEngine.Debug.DrawLine(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Color, float)

Here are the examples of the csharp api UnityEngine.Debug.DrawLine(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Color, float) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 Source : Airplane_Realtime.cs
with MIT License
from SmallPlanet

public void UpdateInfo(FlightInfo info) {
        this.info = info;
        var alreplacedude = info.alreplacedude * meter * 100; //With the scale of the earth, you can't really see the difference in alreplacedude height between planes, so multiply by 100 to exaggerate it.
        Debug.DrawLine(transform.position, transform.position + -transform.up * alreplacedude, Color.yellow, 2f);

        transform.rotation = Quaternion.idenreplacedy;
        planeModel.rotation = Quaternion.idenreplacedy;

        //Heading is based on angle from north pole, so look at true north then rotate to heading
        planeModel.rotation = Quaternion.LookRotation(northPole.position - planeModel.position);
        planeModel.rotation = Quaternion.Euler(0f, info.heading + planeModel.rotation.eulerAngles.y, 0f);

        var line = PlanetUtility.VectorFromLatLng(info.location.lareplacedude, info.location.longitude, Vector3.right);
        var planetHit = PlanetUtility.LineFromOriginToSurface(planet, line, LayerMask.GetMask("Planet"));

        if (planetHit.HasValue) {
            Debug.DrawLine(planetHit.Value.point, planetHit.Value.point + planetHit.Value.point * alreplacedude, Color.red, 2f);

            transform.position = planetHit.Value.point + planetHit.Value.point * alreplacedude;
            transform.up = planetHit.Value.normal;
        }
    }

19 Source : VoxelRasterization.cs
with MIT License
from XINCGer

public void DebugDrawSpans () {
#if !ASTAR_RECAST_CLreplaced_BASED_LINKED_LIST
			int wd = voxelArea.width*voxelArea.depth;
			var min = forcedBounds.min;

			LinkedVoxelSpan[] spans = voxelArea.linkedSpans;
			for (int z = 0, pz = 0; z < wd; z += voxelArea.width, pz++) {
				for (int x = 0; x < voxelArea.width; x++) {
					for (int s = z+x; s != -1 && spans[s].bottom != VoxelArea.InvalidSpanValue; s = spans[s].next) {
						uint bottom = spans[s].top;
						uint top = spans[s].next != -1 ? spans[spans[s].next].bottom : VoxelArea.MaxHeight;

						if (bottom > top) {
							Debug.Log(bottom + " " + top);
							Debug.DrawLine(new Vector3(x*cellSize, bottom*cellHeight, pz*cellSize)+min, new Vector3(x*cellSize, top*cellHeight, pz*cellSize)+min, Color.yellow, 1);
						}
						//Debug.DrawRay (p,voxelArea.VectorDirection[d]*cellSize*0.5F,Color.red);
						if (top - bottom < voxelWalkableHeight) {
							//spans[s].area = UnwalkableArea;
						}
					}
				}
			}
#else
			Debug.LogError("This debug method only works with !ASTAR_RECAST_CLreplaced_BASED_LINKED_LIST");
#endif
		}