break_level_instance
Break an ALevelInstance actor to unnest its sub-level content into the current editor level as plain actors, then destroy the original level instance.
Instructions
Breaks an ALevelInstance actor, un-nesting its sub-level content into the current editor level as plain actors and destroying the original level-instance actor. Canonical headless path: resolve the ALevelInstance by label/name, then ULevelInstanceSubsystem::CanBreakLevelInstance (gate) -> BlockLoadLevelInstance (synchronous load) -> BreakLevelInstance. CanBreakLevelInstance is checked BEFORE BlockLoadLevelInstance on purpose: BlockLoadLevelInstance asserts check(!IsEditing()) and CanBreakLevelInstance rejects the editing/level-script states, so this ordering prevents the assert. BreakLevelInstance returns false when nothing was moved (an empty sub-level is the honest broke=false case, NOT an error). The original actor is destroyed by the engine, so this is a one-shot destructive op: re-running with the same name reports "level instance not found". Requires the editor (GEditor); BreakLevelInstance touches GEditor->GetSelectedActors()/Trans unguarded.
Returns: { actor_name: string, broke: bool, moved_actor_count: number, moved_actors: [string], levels: number, keep_folders: bool, was_loaded_forced: bool, note: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| levels | No | Optional, default 1. How many nested levels deep to break (passed to BreakLevelInstance Levels). | |
| actor_name | Yes | Required. Label or name of the ALevelInstance actor to break (matched via GetActorNameOrLabel). | |
| keep_folders | No | Optional, default false. When true, preserve the source actor folders (ELevelInstanceBreakFlags::KeepFolders) instead of flattening them. |