Hey guys,
So I’ve extended APlayerStart with my own, AShipStart, from which I inherit to create the blueprint BP_ShipStart.
I’m adding a UBoxComponent to it, which I’m using as a sort of spawn zone that must be clear of players before it’s considered valid/usable.
.h:
UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Components)
TSubobjectPtr<UBoxComponent> SpawnBoxComponent;
.cpp
AShipStart::AShipStart(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
SpawnBoxComponent = PCIP.CreateDefaultSubobject<UBoxComponent>(this, "Spawn Box");
SpawnBoxComponent->SetWorldScale3D(FVector(200, 200, 200));
SpawnBoxComponent->AttachTo(RootComponent);
}
After this, when I open the editor I get a message about a ‘bad component’ with reference to the above UBoxComponent.
Error Failed import: BoxComponent
/Game/Blueprints/Core/BP_ShipStart.Default__BP_ShipStart_C:Spawn
Box in /Game/Maps/Default_Map
It also often crashes when hitting ‘Play’ in the editor.
Ensure condition failed: false
[File:F:\P4_BH_Home\UnrealEngine\Engine\Source\Runtime\Engine\Private\SceneComponent.cpp]
[Line: 744] Template Mismatch during
attachment. Attaching instanced
component to template component.
Parent ‘CollisionCapsule’ Self ‘Spawn
Box’ UE4Editor.exe has triggered a
breakpoint.
Any ideas? Never encountered this before.
(Post is clone of forum thread here. Forgot to say there that I’m using the source-built preview build 2289630).