[ This is a repost from my forum post: Strange issue: defaults resetting on BPs derived from other BPs - Blueprint - Unreal Engine Forums ]
Just throwing this out here to see if anyone else has encountered this, and maybe knows of a way to fix it.
In my current project, I have a base class (in BP) for throwable objects, i.e. anything that the player can, well, throw. The base class is of course never instanced, but used to handle all the general stuff that applies to any specific throwable, which are individual BP classes using the base as parent.
This was working as expected until yesterday, when the default values for variables defined in the base class suddenly started going back to ‘0.0’ or ‘None’ or whatever’s the appropriate basic default for each data type, even though they had specific non-zero values set in the base class.
The strangest thing is that everything seems to work fine while fiddling with this in a single UEeditor session, but if I save everything, quit the editor, and then load it back up, then all the derived classes will have their defaults zeroed out again.
It appears as if this doesn’t happen until you derive more than one child from a common parent BP, but I have not yet had time to verify this in a clean project.
I’ve tried reparenting and then going back to the intended base class again to see if that would refresh things a bit (and it does, but resets again when the editor is closed/reopened). I’ve tried making all the defaults private in the base class, and adding setters/getters where needed. All sorts of strange things, but nothing has helped.
To work around this, today I ended up setting all values explicitly in the construction script for each child BP, which does indeed work reliably, but it’s hardly an ideal solution going forward.
So… has anyone seen this? Did you find a solution?
Oh, and this applies to 4.6.0.