# Custom uscenecomponent?

**URL:** <https://forums.unrealengine.com/t/custom-uscenecomponent/402021>\
**Category:** C++\
**Tags:** custom-component, unreal-engine, CPP, question\
**Created:** [August 16, 2017, 7:39am UTC](https://forums.unrealengine.com/t/custom-uscenecomponent/402021 "2017-08-16T07:39:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lanslot\_Chung](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lanslot\_Chung](https://forums.unrealengine.com/u/Lanslot_Chung)\
**Post date:** [August 16, 2017, 7:39am UTC](https://forums.unrealengine.com/t/custom-uscenecomponent/402021/1 "2017-08-16T07:39:50Z")

</div>

i create custom scenecomponent:

```
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class CAVEHYPERCUBUS_API UTestComponent : public USceneComponent
{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	UTestComponent();

protected:
	// Called when the game starts
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Cave)
		class UTextureRenderTarget2D* LeftRenderTarget;

```

* * *

```
UTestComponent::UTestComponent()
{
	// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
	// off to improve performance if you don't need them.
	PrimaryComponentTick.bCanEverTick = false;

	USceneCaptureComponent2D* LeftSC = CreateDefaultSubobject<USceneCaptureComponent2D>(TEXT("LeftSceneCapture"));
	LeftSC->SetupAttachment(this);
	LeftSC->TextureTarget = LeftRenderTarget;
}

```

but it seems dont have any effect.

---

<div class="post-metadata">

**Author:** ![MJBrune](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MJBrune](https://forums.unrealengine.com/u/MJBrune)\
**Post date:** [August 21, 2017, 3:18am UTC](https://forums.unrealengine.com/t/custom-uscenecomponent/402021/2 "2017-08-21T03:18:51Z")

</div>

Delete your intermediate folder, regenerate project files and rebuild & launch the project.
