# How spawn UCableComponent in runtime?

**URL:** <https://forums.unrealengine.com/t/how-spawn-ucablecomponent-in-runtime/457482>\
**Category:** C++\
**Tags:** cable-component, unreal-engine, CPP, question\
**Created:** [October 24, 2019, 4:40pm UTC](https://forums.unrealengine.com/t/how-spawn-ucablecomponent-in-runtime/457482 "2019-10-24T16:40:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AAriyAA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AAriyAA](https://forums.unrealengine.com/u/AAriyAA)\
**Post date:** [October 24, 2019, 4:40pm UTC](https://forums.unrealengine.com/t/how-spawn-ucablecomponent-in-runtime/457482/1 "2019-10-24T16:40:23Z")

</div>

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 ?
