Anyone know how to return an array of arrays from a python script? I know that the only way to do this in BP is to make a custom struct/class that has an array inside it but how to approach it in python? I tried
import unreal as UE
UE.uclass()
class GroupedMeshes:
MeshGroups = UE.Array(UE.StaticMeshActor)
@UE.uclass()
class BPFunctionLibrary(UE.BlueprintFunctionLibrary):
@UE.ufunction(ret = UE.Array(GroupedMeshes), params = [UE.World], static = True, meta=dict(Category="PythonScript"))
def getStaticMeshes(MyLevel):
return UE.Array(GroupedMeshes)
but that leaves me with
LogPython: Error: @UE.ufunction(ret = UE.Array(GroupedMeshes))
LogPython: Error: TypeError: Array: ‘type’ (classobj) must be a type
inheriting from StructBase or Actor crashes the editor