Gizmos

Input Action
Right mouse drag Look around
Right mouse + W A S D Fly; Q/E go down/up, Shift is four times faster
Alt + left mouse drag Orbit around the focus point
Middle mouse drag Pan
Mouse wheel Move forward and back
F Frame the selected node

Fly speed, look sensitivity and zoom step are in File → Settings… → Scene Viewer.

Selecting

Click an object in the Scene view to select it, or click it in the Scene Tree. The Inspector shows the selection.

The transform gizmo

The Scene view's toolbar — or W, E and R — picks the tool:

Tool Handles
Move (W) An arrow per axis.
Rotate (E) A ring per axis.
Scale (R) A handle per axis.

Global / Local switches the handles between world axes and the node's own axes.

Snapping

The Snap field on the toolbar sets the step of the current tool: metres for Move (default 1), degrees for Rotate (15), and a factor for Scale (0.1). Set it to 0 to move freely.

Component gizmos

Cameras draw their view frustum and lights their range or direction, so you can see what invisible components do.

Drawing your own gizmos

Write a drawer for your component in your project — no editor reference needed:

namespace Usercode;

public class Patrol : Component
{
    public float Radius = 5f;
}

[CustomGizmo(typeof(PatrolGizmo), typeof(Patrol))]
public sealed class PatrolGizmo : IGizmoDrawer
{
    public void DrawGizmos(Gizmos gizmos, Component component)
    {
        var patrol = (Patrol)component;
        var position = patrol.Node!.GlobalTransform.Position;

        gizmos.Color = new Vector4(1f, 0.8f, 0.2f, 1f);
        gizmos.DrawWireSphere(position, patrol.Radius);
        gizmos.DrawRay(position, patrol.Node.Transform.Forward * 2f);
    }
}

Studio calls DrawGizmos every frame for each matching component while the Scene view is visible; subclasses of the component type match too.

The Gizmos API

Member Draws or sets
DrawLine(from, to) A line segment.
DrawRay(from, direction) A segment from a point along a direction.
DrawWireCube(center, size) / DrawWireCube(matrix) A wireframe box.
DrawWireSphere(center, radius) Three great circles.
DrawCircle(center, normal, radius) A circle facing normal.
DrawArc(…) Part of a circle.
Color RGBA colour of the next shapes.
Thickness Line thickness in pixels.
Matrix Transform applied to the next shapes.
DepthTest false draws on top of the scene instead of being hidden behind it.

Gizmos are editor-only; they are not drawn in exported games.


← All docs Edit this page