# Create a custom SceneCapture2D

**URL:** <https://forums.unrealengine.com/t/create-a-custom-scenecapture2d/445231>\
**Category:** C++\
**Tags:** classes, scenecapture2d, unreal-engine, question, CPP\
**Created:** [March 13, 2019, 10:12pm UTC](https://forums.unrealengine.com/t/create-a-custom-scenecapture2d/445231 "2019-03-13T22:12:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mantau\_MUC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mantau\_MUC](https://forums.unrealengine.com/u/Mantau_MUC)\
**Post date:** [March 13, 2019, 10:12pm UTC](https://forums.unrealengine.com/t/create-a-custom-scenecapture2d/445231/1 "2019-03-13T22:12:40Z")

</div>

I wanted to create a custom class which can be used in the Editor and then create an image stream which can be used somewhere else.

From the editor itself, I can use a SceneCapture2D, and stream to a TextureRenderTarget2D. But if I want to create a custom class, how do I do it?

What I tried (can someone tell me how to properly paste code here?):

Header:

> **[// Fill out your copyright notice in the Description page of Project Settings....](https://pastebin.com/v9MNPiJr)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Cpp:

> **[ACustomCamera\_RGBD::ACustomCamera\_RGBD(): resolution\_X(1000), resolution\_Y(1...](https://pastebin.com/Mq0VRJzg)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

but I do not know how to set the resolution of the render target, and I was not able to figure out how I can actually set the texture target (the code as pasted won’t compile).

Has anyone code of this behaviour I want?
