Problems with Python functions

I’ve been trying to script the editor using Python, and I wanted to test some functions by running them as a single line of Python in the editor console, but they haven’t been working for me. Specfically, functions like unreal.EditorActorSubsystem.get_all_level_actors() and unreal.EditorActorSubsystem.select_nothing() return with an error that they require arguments, even though the documentation specifies that they take no arguments. Is there any way to fix this?

Always get the subsystem first, then call the function in it. For example:

unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_selected_level_actors()

unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors()
3 Likes

Works! Thank you

1 Like