API ReferenceGE Extensionseditor
Prefab Instance Editor
Inspector header extension for PrefabInstance objects - shows template match status and apply/override controls.
Inspector header extension for PrefabInstance objects - shows template match status and apply/override controls.
Overview
Adds a collapsible "PrefabInstance" section to the inspector header when PrefabInstance objects are selected. Detects whether instances differ from their parent template and provides buttons for applying changes or creating new templates.
Public Functions
| Function | Signature | Description |
|---|---|---|
M.onEditorInspectorHeaderGui | (inspectorInfo) | Renders PrefabInstance section in inspector with template comparison UI |
M.onEditorInitialized | () | Logs initialization |
Key Internal Functions
| Function | Description |
|---|---|
prefabInstanceMatchesParent(prefabInstanceId) | Returns true if the instance matches its parent template |
UI Elements
| Element | Condition | Description |
|---|---|---|
| "Make new template" button | Instance differs from parent | Creates a new template from the modified instance |
| "Apply to parent" button | Instance differs from parent | Pushes changes back to the parent template (orange highlight) |
Notes
- Only displays when all selected objects are
PrefabInstanceclass. - The "Apply to parent" button uses an orange highlight (
ImColorByRGB(255,102,0,255)) to draw attention. - Button functionality is stubbed (empty handlers) - likely WIP or handled elsewhere.
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide