I can create a new Object and get/set properties in Python like that:
my_class = unreal.load_class(None, '/MyPath/MyBp.MyBp_C') # Loaded Class
test_obj = unreal.new_object(my_class) # New Object
current_prop = test_obj.get_editor_property('MyIntProperty') # Get Property
new_prop = test_obj.set_editor_property('MyIntProperty', 5) # Set New Int Property
But How can I create a new Struct and get/set properties to it in Python? For example, I have my custom Struct BPS_MyStruct. Any help is appreciated.
Any chance you ever ended up figuring out how to instantiate a Python object from a editor defined UStruct? I have the same problem and would REALLY prefer to not have to port a bunch of structs to C++
I created an Object class which duplicates all parameters of a Struct. Then I put this Object as an input into a Python node. Or create this Object inside of the Python node.
It looks like a hack but it works. I have to create a wrapper Object and duplicate all parameters of a Struct. I found only this way to exclude any C++ works.