I’ve just started learning Unreal Engine, and I’m using version 5.6.1.
I created a C++ class as follows:
APlayerCharacter::APlayerCharacter()
{
PrimaryActorTick.bCanEverTick = true;
SpringArm = CreateDefaultSubobject(TEXT(“SpringArm”));
SpringArm->SetupAttachment(RootComponent);
Camera = CreateDefaultSubobject(TEXT(“Camera”));
Camera->SetupAttachment(SpringArm, USpringArmComponent::SocketName);
}
Then I created a Blueprint based on this C++ class.
Everything was working fine at first — until I reopened the editor and discovered that the SpringArm
and Camera
components had disappeared.
I’m not sure how to reliably reproduce the issue, but I’ve encountered it twice simply by reopening the editor.
I managed to fix it once by clicking the “Recompile and Reload C++” button, but all the parameters had to be reconfigured from scratch.
Honestly, I’m quite shocked that such a severe bug exists in a commercial-grade game engine. How can I avoid this problem?
Encountering such a serious issue at the very beginning makes me question whether Unreal is really a suitable engine.
I’m using Mac, so there’s no live coding option to disable