How can I use USceneComponent as root?

Hi,

i use USceneComponent as root for my actor. Whenever i start PIE(didn’t try building standalone game) editor freezes for few seconds and LogErrorHandled message appears saying that i attach instanced component to template component.

Code snippet:

	Root = PCIP.CreateDefaultSubobject<USceneComponent>(this, TEXT("Root"));

	MeshComponent = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("MeshComponent"));

	RootComponent = Root;
	MeshComponent->AttachTo(RootComponent);

I’ve been using that before but didn’t notice that error popping up, might be it appeared in 4.1, but can’t be sure.

Anybody had/has this problem?

Regards.

That error disappeared, didn’t do anything regarding it… No idea what happened :slight_smile: Marked as solved.

We have this same issue manifesting in 4.4 when trying to use a SphereComponent as the root, with another scene-component as its child. Is there any further information on what causes this issue?

I’ve also posted some information in a relevant forum thread Here