Failed import on editor startup

Hello,

I wrote a simple c++ actor which should spawn a weapon on a regular basis and extended it with a blueprint.
If I place it in the level, close the map and reopen it I get the following error:

LoadErrors:Error: Error Failed import: SceneComponent /Game/Blueprints/WeaponSpawnerBlueprint.Default__WeaponSpawnerBlueprint_C:Root  in /Game/Maps/map01

The code of the c++ class is nothing exceptional: it spawns a scene component and a box collision component.

WeaponSpawner.cpp

....
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.bStartWithTickEnabled = true;
sceneRootComp = PCIP.CreateDefaultSubobject<USceneComponent>(this, TEXT("Root"));
SetRootComponent(sceneRootComp);
pickBox = PCIP.CreateDefaultSubobject<UBoxComponent>(this, TEXT("Box Collider"));
pickBox->SetBoxExtent(FVector(collisionDistance, collisionDistance, collisionDistance));
....

WeaponSpawner.h

....
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Component")
TSubobjectPtr<USceneComponent> sceneRootComp;

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Spawner")
TSubobjectPtr<UBoxComponent> pickBox;
....

Needless to say, the overlap event never gets called and the box is not shown in editor.

Any idea on what happened?

Thanks,
Riccardo.

Ok, for further reference I needed a full clean + build and the problem is gone.

Go figure…

Yeah, this is an annoying bug within intermediate data.

Hi hjeldin,

I just tried to reproduce this in 4.9.1, but was unable to do so. Was this just a temporary issue in a single project that you resolved by cleaning and rebuilding the project? Also, what version of the Engine were you using?