Skip to main content

Sockets

Sockets are points on a prefab where it joins another prefab, such as the ends of a road piece, a tunnel or a pipe. Drag one socket onto another and RustEdit moves the prefab so the two pieces meet exactly. The two prefabs then stay linked: when you move one, the other moves with it.

Two road pieces joined at their sockets: the linked pair in purple in the middle, a free socket in blue at the end

Which prefabs have sockets​

RustEdit comes with sockets for about 380 Rust prefabs, including:

  • roads, rail tracks and train tunnels
  • tunnels, tunnel links and stations
  • caves, sewers, pipelines and pipes
  • the timber mine, bunker rooms and perimeter walls
  • building foundations, floors, walls and stairs

You can give any other prefab sockets with the Socket Editor. The Sockets panel of the Inspector shows only for prefabs that have sockets.

Show sockets​

Click the Show sockets button on the transform widget in the scene view. Click it again to hide them. RustEdit remembers the setting. Sockets in the scene view's Gizmos menu is the same switch, and the Show gizmos button hides sockets too.

The transform widget with the Sockets button marked

Links keep working while sockets are hidden: linked prefabs still move together.

What the markers mean​

MarkerMeaning
Light blue dot and ringA free socket. The color is the socket's type color; built-in sockets are light blue.
Blue arrowThe way the socket faces: out of the prefab, toward the piece it joins.
Green lineThe socket's up direction.
Purple dot and ringTwo linked sockets. A link is drawn as one marker.
Red dot and ring with a red lineA link whose sockets no longer meet.
Orange ringThe active socket: the one you clicked last.
White ring and a labelThe socket under the pointer, with its name and type.

Markers keep the same size on the screen and fade out far from the camera. Sockets of hidden prefabs are not drawn.

Connect two prefabs​

  1. Turn on the Show sockets button on the transform widget.
  2. Place the two prefabs near each other.
  3. Point at a free socket of the prefab you want to move.
  4. Hold the left mouse button and drag onto a free socket of the other prefab. Sockets that cannot join dim while you drag.
  5. Release the button. The prefab you dragged from (and everything already linked to it) moves and turns so the two sockets meet. The other prefab does not move. The sockets turn purple, and the Notifications panel says "Connected the sockets".

To cancel a drag, press the right mouse button or Esc. Each connect is one undo step.

note

To connect, you drag from a free socket. To move a socket that is already linked, disconnect it first.

Disconnect​

  • Alt and click a linked socket to break its link.
  • Or select the prefab and click Disconnect in the Sockets panel of the Inspector.

Move linked prefabs​

Linked prefabs move as one piece. When you move or turn a prefab, everything linked to it, directly or through other links, moves with it. This works for the gizmo, typed values in the Inspector, Snap to Ground and the other move tools.

  • To move one prefab on its own, turn on Move Individually in the Sockets panel. Links between the moved prefabs and the ones left behind break when you start the move. Undo brings them back.
  • Linked prefabs cannot be scaled. Turn on Move Individually to scale one on its own.
  • If a prefab in the group is locked, nothing in the group can move.
  • Click Select Connected in the Sockets panel to select every prefab joined to the selection.

Turn a linked piece (Spin)​

Some sockets can join at more than one angle, for example square pieces that fit at every 90 degrees.

  1. Click the linked socket to make it active.
  2. Click Spin in the Sockets panel. The piece on that side of the link turns by one step around the socket.

Spin does not work on a link that is part of a loop.

Links are saved in the scene file. They are not in the exported map: Rust does not use them. See Scenes and Maps. Copies made with Duplicate keep the links between the copies. When you delete a linked prefab and undo, its links come back.

If a saved link's prefab or socket is gone (for example, a socket was renamed in a socket file), the link is dropped when the scene opens, and a warning says how many.

Change a prefab's sockets​

To add, move, turn or delete the sockets of a prefab, use the socket editor. See Socket Editor.

Settings​

Open FileSettings, then Sockets:

SettingWhat it does
Draw DistanceHow far from the camera sockets are drawn, in meters. 10 to 2000, default 150.
Handle SizeThe size of the socket markers on the screen, in pixels. 4 to 48, default 16.

Building blocks​

The Building Tool snaps building blocks with Rust's own building sockets, not with these sockets, and it does not link them. Placed blocks still show their free sockets, often two at the same spot. Building blocks only move together if you link them yourself.