TSubclassOf and TSoftClassPtr parameters becomes empty on rebuild project

Good day!

I’ve created custom UStaticMeshComponent called UGunComponent and there I have this:

UPROPERTY(BlueprintReadWrite, EditAnywhere)
TSoftClassPtr <class ABaseProjectile> ProjectileType;

I’m using this variable for spawning ABaseProjectile’s. In blueprint editor I’m assigning to this variable desired ABaseProjectile and everything works fine. But when I’m trying to rebuild visual studio project - that variable becomes empty, like it was never assigned!

I tried use TSubclassOf but achieve same results. Maybe I’ve missed something?

I noticed that it’s applies only to UStaticMeshComponent. I created this variable in my custom APawn class and everything works fine, variables are stored after rebuild as it supposed to be.
What’s wrong with UStaticMeshComponent?

Don’t know how, but I managed to fix it. I just removed my component and added it again. Why this is happens and what to do to not meet this bug again?

you hoy reloading when this occures?