public sealed class SceneLinesEverything a viewport draws over the scene, collected once a frame.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Three sources: the grid, the entities, the gizmo. They are drawn together because they are nearly the same kind of thing — world-space geometry with no material — and collecting them here rather than in three places is what makes each of the passes below one buffer write and one draw call.
⚠ Three lists, and none of the splits is cosmetic. The grid and the markers are depth-tested so an entity behind a wall is behind it; the gizmo is not, because a handle you cannot reach through the thing it moves is a handle you cannot use. That much is two LineRenderers. The third is the gizmo's solid parts — the head on the end of each arm — which are triangles rather than segments and want MeshRenderer, so they cannot share a buffer with either of the other two however alike they look on screen.
An entity with no mesh is drawn as a marker. Until there is a mesh path in the editor that is every entity, and even after there is one it stays true for the lights, the cameras and the empties — which is what doc 11 means by visualisation gizmos.
Fields and properties (14)
public IReadOnlyList<LineVertex> WorldThe segments drawn with the depth test on.
public IReadOnlyList<LineVertex> OverlayThe segments drawn over everything.
public ReadOnlySpan<MeshVertex> HandlesThe gizmo's solid parts, drawn over everything.
public ReadOnlySpan<uint> HandleIndicesThree indices per triangle, into Handles.
public float MarkerSizeHow big an entity's marker is, in world units.
public Color4 MarkerColourThe colour of an entity that is not selected.
public Color4 ReferenceColourThe colour of a reference volume's wireframe.
public Color4 MeasureColourThe colour of the tape measure.
public Color4 SelectedColourThe colour of a selected one.
public Color4 VolumeColourWhat an unselected post-process volume is drawn in.
public Color4 CageColourThe colour the edit cage — every edge of the mesh being edited — is drawn in.
public Color4 ElementColourThe colour a selected element is drawn in.
public Color4 HoverColourThe colour the element under the pointer is drawn in.
public float VertexSizeHow big a vertex handle is, in render pixels.
Methods (1)
public void Build(SceneDocument document, SceneViewport viewport, int height)Collects a frame's lines.
Used by (4)
- ComponentGizmoTestsVixen.Editor.SceneView.Tests
- LightTestsVixen.Editor.SceneView.Tests
- ScenePresenterVixen.Editor.App
- ViewportStateTestsVixen.Editor.SceneView.Tests