unreal.EditorLevelUtils

class unreal.EditorLevelUtils(outer=None, name='None')

Bases: unreal.Object

Editor Level Utils

C++ Source:

  • Module: UnrealEd
  • File: EditorLevelUtils.h
classmethod create_new_streaming_level(level_streaming_class, new_level_path="", move_selected_actors_into_new_level=False) → LevelStreaming

Creates a new streaming level in the current world

Parameters:
  • level_streaming_class (type(Class)) – The streaming class type instead to use for the level.
  • new_level_path (str) – Optional path to the level package path format (“e.g /Game/MyLevel”). If empty, the user will be prompted during the save process.
  • move_selected_actors_into_new_level (bool) – If true, move any selected actors into the new level.
Returns:

Returns the newly created level, or NULL on failure

Return type:

LevelStreaming

classmethod make_level_current(streaming_level) → None

Makes the specified streaming level the current level for editing. The current level is where actors are spawned to when calling SpawnActor

Parameters:streaming_level (LevelStreaming) –
Returns:true If a level was removed.
classmethod move_actors_to_level(actors_to_move, dest_streaming_level, warn_about_references=True) → int32

Moves the specified list of actors to the specified streaming level. The new actors will be selected

Parameters:
  • actors_to_move (Array(Actor)) – List of actors to move
  • dest_streaming_level (LevelStreaming) – The destination streaming level of the current world to move the actors to
  • warn_about_references (bool) – Whether or not to show a modal warning about referenced actors that may no longer function after being moved
Returns:

The number of actors that were successfully moved to the new level

Return type:

int32

classmethod move_selected_actors_to_level(dest_level, warn_about_references=True) → int32

Moves the currently selected actors to the specified streaming level. The new actors will be selected

Parameters:
  • dest_level (LevelStreaming) –
  • warn_about_references (bool) – Whether or not to show a modal warning about referenced actors that may no longer function after being moved
Returns:

The number of actors that were successfully moved to the new level

Return type:

int32

classmethod set_level_visibility(level, should_be_visible, force_layers_visible, modify_mode=LevelVisibilityDirtyMode.MODIFY_ON_CHANGE) → None

Sets a level’s visibility in the editor.

Parameters:
  • level (Level) – The level to modify.
  • should_be_visible (bool) – The level’s new visibility state.
  • force_layers_visible (bool) – If true and the level is visible, force the level’s layers to be visible.
  • modify_mode (LevelVisibilityDirtyMode) –