I have an abstract BaseProjectile base class that my MinigunProjectile inherits from. The only change on the MinigunProjectile is that it sets the default template for the projectile particle (inherited from BaseProjectile) to a minigun particle (normally None on BaseProjectile). My Minigun class uses a SpawnActorFromClass node to spawn MinigunProjectiles. The projectiles have a LaunchVelocity variable that is exposed on spawn and used to set a ProjectileMovementComponent’s launch velocity in BeginPlay. This is not occurring in the child Minigun class in shipping builds while BP nativization is on (it works fine in editor).
EDIT: I’ve discovered the issue was the parent class BeginPlay wasn’t being called by the child even when it wasn’t overriding BeginPlay. My “arbitrary” BeginPlay code fixed it because it included a call to the parent BeginPlay. I double checked to verify: if I don’t override BeginPlay the parent’s BeginPlay will not be called in shipping builds and the expected behavior will not occur. If I override BeginPlay and add a call to the parent (and do nothing else) it resolves the issue.
I couldn’t recreate it in a test project so I fiddled with my main project again to get a better idea of what was going on. It turns out the change I made that mattered was that my BeginPlay in MinigunProjectile called its parent (TurretProjectile BeginPlay). The TurretProjectile BeginPlay sets the projectile initial velocity. It turns out they were spawning but not moving because the TurretProjectile BeginPlay was not being called from MinigunProjectile.
So I think the real bug is that my child class is not calling its parent BeginPlay unless I explicitly tell it to even when the child hasn’t overridden it. This is happening when I build for Shipping with blueprint nativization on and pak compression off.
This is still an issue and seems to be worse than I thought. Data only child blueprints may completely lose random properties in shipping builds. I just had this pop up again with a blueprint that had a completely wrong collision profile until I added a simple BeginPlay override that calls the parent BeginPlay and nothing else. The BeginPlay in the parent doesn’t even change any collision properties so I have no idea why this matters.