`import unreal
@unreal.ustruct()
class MyPyStruct(unreal.StructBase):
number = unreal.uproperty(int)
the BPFL way not being supported offically
@unreal.uclass()
class MyPyClass(unreal.BlueprintFunctionLibrary):
[Content removed] params = [MyPyStruct])
def MyTestFunc(s: MyPyStruct):
return 1.0`Hi,
There were already many questions regarding this, but if possible, I would like to update my information about the transient properties of Python types.
Like many developers, we hope to expose Python-defined functions as blueprint nodes, with a fast iteration utility while extending the Unreal Editor.
Although this extending method isn’t supported officially in the Python scripting documentation, with the feature’s expected usability, we’re still investigating whether alternatives are possible.
The main trouble is that all type instances like UClass defined in Python scripts, and the outer package are marked as transient. Therefore, an exposed Python function cannot be serialized into the asset and is broken when restarting the editor.
For this issue, I have questions:
1) I wonder if these transient flags cannot be safely removed even by modifying the script execution order and re-instancing types.
2) When looking at the history in Perforce, all transient flags are added through the CL 4885914.
The message said that the fixes were for handling the type generation error correctly, but I wonder if the transient flags are still related to the problem.
Additionally, is it related to the UE-69409 issue the changelist is pointing to?
3) Are there recommendations or tips for making the wrapped Python types non-transient?
It would be appreciated if any helpful information could be provided.
Thanks,
Hyeongcheol