UE 4.27 Same old BP subclass variable reset bug

Hello everyone!

I’ve been facing a problem since UE 4.7 and I keep hitting it now on 4.27.2 and even 5.1.
Having a C++ class subclassed by a Blueprint class, after restarting the editor the BP class defaults are lost. I know many people have faced this bug many times before but there was never a solution and I find it quite odd since it can be quite catastrophic in many instances.

For example in one of my current projects. I have set up a procedural recoil system which relays in values set in the RecoilComponent of a Weapon.
Every gun in the game is a Blueprint class that subclasses BaseWeapon and the recoil values for each weapon are set in its corresponding blueprint. Take 20 different weapons with 10 properties each, it adds up. During the course of development I have had the values reset many times.

I imagine that fortnite devs do a similar thing with their weapons, using blueprint classes as sort of presets. I even seem to remember seeing a few examples during the live streams in which fornite code was used and “BP_Scar” was a thing.
Are they setting something up differently to avoid this bug? Am I missing something?

The only possible solution I could think of without going into engine code and try to fix it myself is to set everything up manually in a DataTable. I don’t really like this solution since I need to have code to load and populate the objects, and the less code the better. I find having blueprint subclasses to be much more elegant and I always assumed that was the standard UE way of doing it.

Any suggestions?

Thank you very much for reading!

Hi there @Bliz556, hope you’re well!

This topic has been moved from International to Programming & Scripting.

When posting, please review the categories to ensure your topic is posted in the most relevant space.

Thanks and happy developing! :slight_smile:

1 Like

I’m still battling with this thing. Any ideas?