unreal.UnrealEditorSubsystem

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

Bases: unreal.EditorSubsystem

UUnrealEditorSubsystem Subsystem for exposing editor functionality to scripts

C++ Source:

  • Module: UnrealEd

  • File: UnrealEditorSubsystem.h

get_editor_world() World

Find the World in the world editor. It can then be used as WorldContext by other libraries like GameplayStatics.

Returns

The World used by the world editor.

Return type

World

get_game_world() World

Get Game World

Return type

World

get_level_viewport_camera_info() (camera_location=Vector, camera_rotation=Rotator) or None

Gets information about the camera position for the primary level editor viewport. In non-editor builds, these will be zeroed In the UnrealEd module instead of Level Editor as it uses FLevelEditorViewportClient which is in this module

Returns

Whether or not we were able to get a camera for a level editing viewport

camera_location (Vector): (out) Current location of the level editing viewport camera, or zero if none found

camera_rotation (Rotator): (out) Current rotation of the level editing viewport camera, or zero if none found

Return type

tuple or None

set_level_viewport_camera_info(camera_location, camera_rotation) None

Sets information about the camera position for the primary level editor viewport. In the UnrealEd module instead of Level Editor as it uses FLevelEditorViewportClient which is in this module

Parameters
  • camera_location (Vector) – Location the camera will be moved to.

  • camera_rotation (Rotator) – Rotation the camera will be set to.