edit_level_instance
Enter in-place edit mode on an ALevelInstance to modify its actors: unloads the instanced sub-level and reloads it as an editable streaming level. Close with commit_level_instance.
Instructions
Enters in-place edit mode on an ALevelInstance: the engine unloads the instanced sub-level and re-loads it as an editable streaming level so its actors can be modified in the current editor world, then closed by commit_level_instance. Canonical headless path: resolve the ALevelInstance by label/name, then ULevelInstanceSubsystem::CanEditLevelInstance (gate) -> EditLevelInstance. CanEditLevelInstance is checked BEFORE EditLevelInstance on purpose: EditLevelInstanceInternal opens with check(CanEditLevelInstance(LI)) — a HARD ASSERT — so this ordering turns an un-editable instance into an honest error (with the engine's Reason) instead of a crash. Idempotent: an instance already in edit mode is a no-op (already_editing:true, editing:true). DEFENSIVE CRASH GUARD: on a World-Partitioned map the edit path calls FModuleManager::GetModuleChecked("LevelInstanceEditor") which asserts if that module is not loaded; when the world is partitioned AND the LevelInstanceEditor module is not loaded we fail honestly instead of proceeding. (create_level_instance produces non-partitioned maps, so the normal flow passes this guard.) Requires the editor (GEditor); EditLevelInstance touches GEditor->Trans / selection unguarded. The edit resets the undo stack and streams the world asynchronously (deferred world-swap), so the edit MUST be closed by a matching commit_level_instance.
Returns: { actor_name: string, editing: bool, already_editing: bool, note: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Required. Label or name of the ALevelInstance actor to open for edit (matched via GetActorNameOrLabel). |