使用蓝图,我可以通过内置的 Python 脚本插件使用 , 但使用 Python 脚本SpawnActorFromClass
,StaticMeshActor
unreal.EditorLevelLibrary().spawn_actor_from_class(ue.Class(name='StaticMeshActor'), location, rot)
我有:
LogPython: Error: TypeError: EditorLevelLibrary: Failed to convert parameter 'actor_class' when calling function 'EditorLevelLibrary.SpawnActorFromClass' on 'Default__EditorLevelLibrary'
LogPython: Error: TypeError: NativizeProperty: Cannot nativize 'Class' as 'ActorClass' (ClassProperty)
LogPython: Error: TypeError: NativizeClass: Cannot nativize 'Class' as 'Class' (allowed Class type: 'Actor')
我错过了什么?