Cannot set USTRUCT

So, I have a Widget (BP) that has a USTRUCT defined in C++ that in turn has a UObject* UPROPERTY. My parent widget has a function that takes the aforementioned struct, creates an instance of my widget and passes the struct into it.

I check the validity of the UObject from the passed struct and it’s valid. But once I set the widget’s struct to that one, its UObject is still invalid.

Anyone have any idea why this might be? If it’s of any significance, when I take my struct and feed it into a Set Struct Members node, the UObject property isn’t on the list.

hi DamirH sounds like you forget set UPROPERTY readwrite option, try UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = “UMG”) works for me.


Hmmm… I don’t have the code on me, but that might be it. Will give it a shot.