How spawn UCableComponent in runtime?

AAriyAA
Thu, 24 Oct 2019 16:40:23 +0000
C++

i use :

	Cable = NewObject<UCableComponent>(this,UCableComponent::StaticClass(), FName("Cable"));

	if (Cable)
		 {
		     Cable->RegisterComponent();
			 Cable->AttachTo(GetRootComponent(), NAME_None);
         }

but an unreal crash.
is this cause UCableComp is plugin ?

1 post - 1 participant