Template Mismatch when attaching components

I’ve been trying to run my project through the Launch feature, rather than PIE and consistently get this error when spawning a certain actor.


Ensure condition failed: false [File:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp] [Line: 1897]
Template Mismatch during attachment. Attaching instanced component to template component. Parent 'Default__YellowTeleporter_C' (Owner 'None') Self 'Collider' (Owner 'MyRoomBasicFloorAndWalls_C_0').
[2021.02.15-00.03.45:931][293]LogOutputDevice: Error: Ensure condition failed: false [File:/Build/++UE4/Sync/Engine/Source/Runtime/Engine/Private/Components/SceneComponent.cpp] [Line: 1897]
Template Mismatch during attachment. Attaching instanced component to template component. Parent 'Default__YellowTeleporter_C' (Owner 'None') Self 'Collider' (Owner 'MyRoomBasicFloorAndWalls_C_0').

As far as I can tell, a YellowTeleporter has not finished creation when its component collider is attached. The collider is attached in code at the end of the teleporters BeginPlay function; the collider is a UPROPERTY, and the teleporter is a component that exists within the blueprint class being spawned, which eliminates two common causes of this error.

I’ve run through the code in the VS debugger, and the error is triggered before my code to attach the collider is even hit.

Does anyone have any idea what could be causing this? It happens in every non-PIE mode.

Many thanks,
Jake

2 Likes

same thing, can’t find a solution.