从python中删除无情的演员
我尝试使用python删除场景中的一些演员,但要遇到错误,我不知道如何修改代码。
错误是在第二个句子中生成的:
get_editor_subsystem()恰好1个参数(0给定)
这是我的代码:
path=“Test.thisIsTest”
unrealSystem=unreal.get_editor_subsystem()
delete_actor=unrealSystem.get_actor_reference(path)
unreal.EditorActorSubsystem.destroy_actor(delete_actor)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要在第2行中指定子系统类型:
希望它有所帮助。
You need to specify the Subsystem type in line 2:
I hope it helps.
我建议另一种方法:
I would suggest another way: