Unreal Editor Crash when reopening with ConstructorHelpers

Oblongamous
Sun, 04 Mar 2018 21:57:55 +0000
Platform & Builds

UStaticMeshComponent* Box = CreateDefaultSubobject(TEXT(“Visual Representation”));
Box->SetupAttachment(RootComponent);
static ConstructorHelpers::FObjectFinder BoxAsset(TEXT("/Game/Meshes/Debugs/Box.Box"));
if (BoxAsset.Succeeded()) {
Box->SetStaticMesh(BoxAsset.Object);
Box->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
Box->SetWorldScale3D(FVector(1.0f));
}

	GEngine->AddOnScreenDebugMessage(-1, 3, FColor::Emerald, TEXT("PEA HAS BEEN SPAWNED"));

When the above code is commented, I can successfully open the unreal editor; I can then uncomment and compile when the tests working fine. However, if I keep this code uncommented exit the editor and re-open I get an unreal crash at 72% or 50%… it changes. Is there a reason for this? the log does not show any errors and the crash popup’s bottom section, even when left for quite a while does not change from the loading icon.

2 posts - 1 participant