This crashes on a listen server running from the command line with -game, as it calls CreateEditorOnlyDefaultSubobject, then doesn’t check the return value before using it. Changing to:
BillboardComponent = ObjectInitializer.CreateEditorOnlyDefaultSubobject<UBillboardComponent>(this, TEXT("Billboard"), true);
if(BillboardComponent != nullptr)
{
SpriteTexture = ConstructorStatics.STIconTextureObject.Get();
BillboardComponent->Sprite = SpriteTexture;
BillboardComponent->RelativeScale3D = FVector(0.4f, 0.4f, 0.4f);
BillboardComponent->bIsScreenSizeScaled = true;
BillboardComponent->bAbsoluteScale = true;
BillboardComponent->bReceivesDecals = false;
BillboardComponent->SetupAttachment(this);
}
Fixes that.
-Brian.