Download

Override C++ UPROPERTY variables in Blueprint child class

Hello,

I’m new to unreal and I was wondering how it would be possible to override a C++ UPROPERTY in the blueprint child class.

I have a UPROPERTY which is EditDefaultsOnly, I have some method in my C++ class that use this property. In the blueprint child class, I set those properties in the editor but the values are not reflected to the parent class UPROPERTY. The value is correctly set in the blueprint when I print it tho.

Is this normal behavior in Unreal ? If it is, how can I work around it ?

I’m afraid it’s not possible. I suggest you to post it under c++ programming forums, too, and answerhub trying to reach most people possible, this is an interesting question.

As StarfireDev pointed out it is not possible to override Propertys. The behaviour is also correct, Parent Classes dont care what Child Classes do.
If however a UPROPERTY should have different behaviour (Editable in Parent class but not in child class) you have to use **Interfaces **which provide Getter/Setter for the property or other members to provide logic.