Only horizontal Lines are Drawn with Debug.DrawLine in GameView

Viewed 126

I try to create a Grid with Unity. For Debugging Purpose, I want to Draw the Boxes with Debug.DrawLine.

//Drawe Grid Box Lines
//Horizontal Lines
Debug.DrawLine(GetWorldPosition(x, y), GetWorldPosition(x + 1, y), Color.white, 100f);
Debug.Log("Line Drawn: " + GetWorldPosition(x, y) + ", " + GetWorldPosition(x + 1, y));
//Vertical Lines
Debug.DrawLine(GetWorldPosition(x, y), GetWorldPosition(x, y + 1), Color.white, 100f);
Debug.Log("Line Drawn: " + GetWorldPosition(x, y) + ", " + GetWorldPosition(x, y + 1));

In the SceneView, it's rendering fine:

enter image description here

In the GameView instead, it only rendering the Vertical Lines:

enter image description here

Does anyone have an idea why only the Vertical lines are printed?

The Debug.Log shows me one correct Line for all Lines, Vertical and Horizontal.

Thank you

1 Answers

It is just a rendering anomaly. If you zoom in in the game view, the lines will show up.

Related