Default variables bug with parent/grand-parent

Hello everyone!

I noticed a potential bug (or not?).

I created an actor class with several variables of different types. One of theses variables is set (it’s a class reference).
I created a child actor, and a grandchild actor based on the child actor.
In the grandchild actor I set up some default values (booleans to true).
I compiled and saved.

When I closed and re-opened the editor, some values were reset : the class reference on the grand parent was keept set, but was changed to “none” on the grandchild actor. The booleans were reset in the grandchildren.

Sometimes booleans and class reference values change to default when I compile!

Maybe I did something wrong or forget some fonctionnalities related to parent/child relationship…

Thank you for help!

Some addition information :

I found a lot of old related threads like this : https://answers.unrealengine.com/questions/416892/view.html
The last post said error occurs always in 4.21.

But the issue is resolved in the UE bug report : Unreal Engine Issues and Bug Tracker (UE-22557)

It seems that it’s a bug. Also the link you provided to a bug, that got fixed, describes a different bug if I interpret what you have written right.
If your value resets on compiling or reopening editor and not, when you’re renaming the variable inside parent (or grandparent) class, then I was getting similar bugs, when working with Data Asset I created (and it’s children) inside UE version 4.21.2.

For me all the references inside children of my Data Asset to another children of the same Data Asset were resetting every time I reopened the editor or sometimes when I compiled and played the project. Although for my case, I kind of understand why they can lose reference to the child (the field with reference value was set in parrent, so it may lose refernce to the child, because they don’t exist when compiling). It’s hard to explain.

For your issue with boolean values resetting it’s hard to trace the issue, and I am more than sure it’s a bug, even if my case somehow wasn’t.

You may find and vote on or write a new (if doesn’t exist yet) bug report on the subject and prey it would be fixed.

For a workaround, I think you need to find implementation for your problem without inheritance if you don’t want to slowly lose sanity manually setting values every time they reset.

Best regards…

Hello @TRI99ER_

I tried on a blank project and I got the same problem. So I can confirm is a bug.

The problem is solved for this version of the engine : 4.24.3.

Finally. Nice.