.vmap files and can be loaded by games that support them, in addition to or instead of scene-based levels.
Opening the mapping tool
Open the mapping tool from the Tools menu in the editor. If you are working in an Addon Project, select the target game that the map is being created for before opening the tool.Map files
Maps are saved as.vmap files inside your project’s maps/ folder. A compiled map (.vmap_c) is what the engine actually loads at runtime. The editor compiles the map for you automatically when needed.
Creating geometry
The mapping tool uses brushes — convex solid shapes — to build world geometry. Use the brush tools to place, resize, and carve geometry in the 3D viewport.Select the brush tool
In the mapping tool toolbar, select the Block Tool to create new brush geometry. Use the 3D or 2D viewport to draw the brush shape.
Resize and position
After placing a brush, use the Select Tool to grab handles and resize it. Use the Inspector to set exact dimensions and position.
Apply materials
Select a face on a brush and use the Texture Tool to apply a material. You can browse materials in the Asset Browser and drag them onto faces.
Add entities
Entities are special objects in a map — lights, spawn points, triggers, and more. Right-click the viewport and choose to create an entity, then configure it in the Inspector.
Addon maps
If you are creating a map as part of an Addon Project, your map will appear in the Asset Browser once compiled. Publish it from there to make it available on sbox.game.Maps created in Addon Projects use the components and assets from the target game. Make sure the correct target game is set in your project settings before building map content.
Editor events for mapping
If you are writing editor tools that interact with the mapping tool, several editor events are available:| Event | Description |
|---|---|
hammer.initialized | Fires when the mapping tool opens |
hammer.selection.changed | Fires when the selection changes |
hammer.rendermapview | Fires for each MapView before rendering begins |
hammer.mapview.contextmenu | Fires when the MapView is right-clicked |
[EditorEvent] attribute.