Basically I want to copy the default values of a blueprint’s struct variable (the defaults of the struct as set in the BP defaults, not the struct definition defaults) so I can use them to change other game settings with a script.
Right now I’m trying to get the nested struct value with
If LevelData is a struct instance then that should work. How is your struct type defined?
User Defined Structs (structs defined as assets) use mangled internal names for properties, and I suspect that it would be impossible to find them from Python as things currently stand, though C++ defined structs should work just fine.
The only way worked for me is to extend python with C++.
Make sure the struct type is Blueprintable, by adding macro USTRUCT(Blueprintable). Then in my blueprint function library plugin, I defined my own C++ functions to read and write the user defined struct type variables. And finally I could access the data I wanted with Python back in editor…
Can this access any property of any type by name within any number of struct layers? I am looking for a version of Set Editor Property from Kismet that… well… actually works. Apparently the original devs of Kismet never heard of structs.