TankAiming looses Projectile Blueprint after restarting Unreal

In the tank aiming component, we have to set the Projectile Blueprint in the Details tab. I’ve noticed that after every time I restart Unreal rather it crashes, or I save everything and restart it, I have to reset the Projectile Blueprint…

Is this normal? Is there something that I may have done wrong? I looked at possible UPROPERTY settings in the UE docs, but didn’t see anything that jumped out at me as being the culprit.

And I’ve also noticed this is the case with the Launch Speed variable. When I changed it to 20000 as instructed in lecture 239 Improving Tank Aiming, the variable always goes back to the value specified in code which is 4000.

It’s as if my Tank_BP is not serializing some values for some reason. Maybe it’s not supposed to???

And yes… I’ve ensured that I’ve saved and compiled the blueprint as well as doing a Save All on the project itself.

Thanks!

So, I found a fix/work around. The fix was to completely remove the TankAiming component from the Tank_BP. I then re added it. Everything seems to be serializing now.

You may still get issues with it being unset upon HotReloading. I suggest you make it a UPROPERTY BlueprintReadWrite and set it in the construction script in blueprint.