1

I try to delete some actors in the scene using python but keep getting errors, I don't know how to modify my code.

The error is generated in the second sentence:

get_editor_subsystem() takes exactly 1 argument (0 given)

Here is my code:

path=“Test.thisIsTest”
unrealSystem=unreal.get_editor_subsystem()
delete_actor=unrealSystem.get_actor_reference(path)
unreal.EditorActorSubsystem.destroy_actor(delete_actor)
BoppreH
  • 8,014
  • 4
  • 34
  • 71
eldridge
  • 11
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 09 '22 at 11:06

1 Answers1

1

You need to specify the Subsystem type in line 2:

unreal.get_editor_subsystem(unreal.EditorActorSubsystem)

I hope it helps.

BoppreH
  • 8,014
  • 4
  • 34
  • 71