I have this simple code here:
AMyCharacter::AMyCharacter()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
StaticMesh = CreateDefaultSubobject<UStaticMeshComponent>("StaticMesh");
StaticMesh->SetupAttachment(GetCapsuleComponent());
SpringArm = CreateDefaultSubobject<USpringArmComponent>("SpringArm");
SpringArm->SetupAttachment(RootComponent);
SpringArm->SetRelativeRotation(FRotator(-38.f, 0.f, 0.f));
SpringArm->TargetArmLength = 500.f;
SpringArm->bEnableCameraLag = true;
SpringArm->CameraRotationLagSpeed = 1.f;
Camera = CreateDefaultSubobject<UCameraComponent>("Camera");
Camera->SetupAttachment(SpringArm);
}
But changing the value of the rotation of the arm spring and hitting “Compile” inside UE, shows no changes in the arm spring.
Then, if I close the editor and re-open it, then the arm-spring rotation is properly updated.
Edit: I’ve just discovered that clicking “AssetAction->Reload” from the editor, display the proper updated arm-spring rotation.
There is a way for that action to be taken automatically on Compile?