unreal.LevelEditorSubsystem
¶
- class unreal.LevelEditorSubsystem(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
EditorSubsystem
ULevelEditorSubsystem Subsystem for exposing Level Editor related functionality to scripts
C++ Source:
Module: LevelEditor
File: LevelEditorSubsystem.h
Editor Properties: (see get_editor_property/set_editor_property)
on_editor_camera_moved
(OnLevelEditorEditorCameraMoved): [Read-Write] Expose EditorCameraMoved to blueprintson_map_changed
(OnLevelEditorMapChanged): [Read-Write] Expose MapChanged to blueprints. Note: This executes too early for some editor scripting, consider using OnMapOpened if this doesn’t work for you.on_map_opened
(OnLevelEditorMapOpened): [Read-Write] Expose MapOpened to blueprintson_post_save_world
(OnLevelEditorPostSaveWorld): [Read-Write] Expose PostSaveWorld to blueprintson_pre_save_world
(OnLevelEditorPreSaveWorld): [Read-Write] Expose PreSaveWorld to blueprints
- build_light_maps(quality=LightingBuildQuality.QUALITY_PRODUCTION, with_reflection_captures=False) bool ¶
Build Light Maps and optionally the reflection captures.
- Parameters:
quality (LightingBuildQuality) – One of the enum LightingBuildQuality value. Default is Quality_Production.
with_reflection_captures (bool) – Build the related reflection captures after building the light maps.
- Returns:
True if build was successful.
- Return type:
- eject_pilot_level_actor(viewport_config_key='None') None ¶
Eject Pilot Level Actor
- Parameters:
viewport_config_key (Name) –
- get_current_level() Level ¶
Get the current level used by the world editor.
- Returns:
The current level
- Return type:
- get_selection_set() TypedElementSelectionSet ¶
Get the selection set for the current world, you can use this to track and create changes to the level editor’s selection
- Return type:
- load_level(asset_path) bool ¶
Close the current Persistent Level (without saving it). Loads the specified level.
- new_level(asset_path) bool ¶
Close the current Persistent Level (without saving it). Create a new blank Level and save it. Load the new created level.
- new_level_from_template(asset_path, template_asset_path) bool ¶
Close the current Persistent Level (without saving it). Create a new Level base on another level and save it. Load the new created level.
- property on_editor_camera_moved: OnLevelEditorEditorCameraMoved¶
[Read-Write] Expose EditorCameraMoved to blueprints
- Type:
- property on_map_changed: OnLevelEditorMapChanged¶
This executes too early for some editor scripting, consider using OnMapOpened if this doesn’t work for you.
- Type:
- Type:
[Read-Write] Expose MapChanged to blueprints. Note
- property on_map_opened: OnLevelEditorMapOpened¶
[Read-Write] Expose MapOpened to blueprints
- Type:
- property on_post_save_world: OnLevelEditorPostSaveWorld¶
[Read-Write] Expose PostSaveWorld to blueprints
- Type:
- property on_pre_save_world: OnLevelEditorPreSaveWorld¶
[Read-Write] Expose PreSaveWorld to blueprints
- Type:
- save_all_dirty_levels() bool ¶
Saves all Level currently loaded by the World Editor.
- Returns:
True if the operation succeeds.
- Return type:
- save_current_level() bool ¶
Saves the specified Level. Must already be saved at lease once to have a valid path.
- Returns:
True if the operation succeeds.
- Return type: