[UE 4.8] Error on playing game when an actor of a custom class is placed in the level

Hello, i updated to 4.8 and i when i place an actor on the level of a class i made and play the game i get this error:

Ensure condition failed: false [File:C:\UnrealEngine\Engine\Source\Runtime\Engine\Private\Components\SceneComponent.cpp] [Line: 1149]
Template Mismatch during attachment. Attaching instanced component to template component. Parent ‘Mesh’ Self ‘Collider’

The editor doesn’t crash and allows me to continue, but the actor doesn’t collide. Here is the init code for the collider:


UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite, Category = "Collision")
UBoxComponent * CollisionComp;


CollisionComp = ObjectInitializer.CreateDefaultSubobject<UBoxComponent>(this, TEXT("Collider"));
CollisionComp->InitBoxExtent(FVector(1.0f, 1.0f, 1.0f));
CollisionComp->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Overlap);
CollisionComp->AttachParent = RootComponent;

What am i doing wrong? This worked in 4.7.