API ReferenceGE Extensionseditor
Object Tool (Object Select Edit Mode)
The primary object manipulation edit mode - handles selection, transform gizmos, copy/paste, duplication, rectangle selection, and surface alignment.
The primary object manipulation edit mode - handles selection, transform gizmos, copy/paste, duplication, rectangle selection, and surface alignment.
Overview
Implements the objectSelect edit mode, the default editing mode in the World Editor. Provides click/rectangle selection, translate/rotate/scale gizmos, drag-to-duplicate, copy/paste clipboard, surface alignment (Ctrl+Alt+Click), and extensive preference registration for gizmos, snapping, and object icons.
Public Functions
| Function | Signature | Description |
|---|---|---|
M.onEditorInitialized | () | Registers the objectSelect edit mode, preferences, and context menu items |
M.onEditorPreferenceValueChanged | (path, value) | Applies preference changes to C++ engine (gizmo settings, icons, snapping) |
M.onEditorRegisterPreferences | (prefsRegistry) | Registers categories: gizmos, snapping with extensive sub-preferences |
M.onEditorAxisGizmoAligmentChanged | () | Updates gizmo transform when alignment mode changes |
M.onEditorInspectorFieldChanged | (selectedIds, fieldName, fieldValue, arrayIndex) | Handles TimeOfDay field changes |
M.onEditorEditModeActivated | (editMode) | Restores gizmo state for the activated edit mode |
M.onEditorEditModeDeactivated | (editMode) | Saves gizmo state when deactivating an edit mode |
Registered API Functions
| Function | Description |
|---|---|
editor.updateObjectSelectionAxisGizmo | Updates gizmo position/orientation for current selection |
editor.drawSelectedObjectBBox | Draws bounding box wireframe for a single object |
editor.drawSelectionBBox | Draws a generic bounding box from a matrix |
editor.duplicateSelectionAtCamera | Duplicates selection and places at camera look-at point |
editor.duplicateSceneObjects | Duplicates current selection (supports drag-duplicate) |
editor.moveSelectionAtCamera | Moves selection to camera look-at position |
Edit Mode Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+C / Ctrl+V | Copy / Paste objects |
| Ctrl+D | Duplicate objects |
| Delete | Delete selected objects |
| Shift+Duplicate | Duplicate at camera position |
| Shift+Drag Gizmo | Drag-and-duplicate |
| Ctrl+Alt+Click | Align object to surface normal (mouse wheel rotates) |
Preference Categories
| Category | Sub-Category | Key Preferences |
|---|---|---|
gizmos | general | useObjectBoxCenter, drawObjectIcons, lineThicknessScale, objectHoverHighlight |
gizmos | objectIcons | constantSizeIcons, fadeIcons, iconBackgroundType, colors |
gizmos | brush | marginSize, createBrushColor, deleteBrushColor |
snapping | general | snapToGrid, gridSize, rotateSnapEnabled, rotateSnapSize |
snapping | terrain | enabled, keepHeight, snapToCenter, relRotation |
Notes
- Vehicle selection renders reference node visualization (colored cylinders for axes).
- Rectangle selection uses camera frustum culling for object detection.
- Locked objects display a red bounding box and cannot be deleted (notification shown).
- Prefab instances are selected at the top-level prefab unless already selected.
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide