Inherited class values reset on engineload

Hey guys,

So I’m hitting my head against a wall with what I’m 99% sure if an engine bug. At the moment I have a base game character and bad guys that inherit from that class. I also have a gamemode that loads in team info classes that store a reference to each team class and a cost associated with it.

Here’s where things get weird: If an inherited class is referenced in a team info then on engine load the anim blueprint and mesh references in it are made null, even though it should just be the same as their parent class. Given that team infos aren’t even looked at until Begin Play this makes me think it’s an issue somewhere in the engine. Any suggestions? I could really use some help on this!

I’m happy to submit the project for review if need be.

Hi HighlySpammable,

I’ll take you up on your offer of providing the project and I’ll be happy to help you find out what is causing this issue. If you can’t find the project due to Answerhub’s size limitations, please feel free to use a third-party hosting site such as DropBox.

Did you end up solving this? I have the exact same issue. Defaults on the skeletal mesh component in a child class are being reset on project launch, but ONLY if the class is referenced in my PlayerState. Present in 4.7.6 and 4.8.1. Weird as hell.

Check in your derived blueprints and ensure that the relevant section dropdowns haven’t gotten None selected. Reset it with the yellow arrow on the right and it should help.

This happened to me due to the way FObjectInitializer works (and occasionally cpp derived bp’s have hiccups with their components…).

This thread helped me figure it out: UPROPERTY member vars reset to NULL by ObjectInitializer - C++ - Unreal Engine Forums

Hijacking this thread a bit here: Yeah, the issue is that after you reset them, they will go back to None every subsequent time the project is opened.

Check that thread for ideas re: clearing derived caches and things like that. Otherwise it might be a completely different issue

Hi Acren,

Unfortunately HighlySpammable never got back to me so I did not pursue the issue. It seems as though may have an answer that is appropriate for you. If their answer isn’t able to help you solve this issue however, let me know and I’ll be happy to assist you to the best of my ability.