🎓Rendering a scene in a created window
📄 Requirements
To have a basic understanding on how this plugin gets used
you followed step 2: Installing This Plugin
you followed step 3: Enabling This Plugin
you followed step 4: Working With The Subystem
➕ Creating the new assets we need
Locate your content browser (If not visible, press CTRL+Spacebar) and create the following list of assets:
Actor - This will be our scene renderer when can place in the level or attach to something
Widget - This will contain our real time rendered scene
Render Target - We will feed this into our renderer to use the rendered scene in a material
Material - From the render target we need to create a material to show it in a widget
Click on Save All

💻 Setting up the actor
Open the actor by double clicking it
In your actor, click on “Add”. Then search for “Scene Capture Component 2D” and click on it. Note: If you don’t see the Components tab, hover over “Window” at the very top of the screen and select “Components”

Select the Scene Capture Component 2D you just created and select the Render Target we created in step 1 in the details panel

If you don’t follow the tutorial and already have your own scene capture component: Make sure to have the “Capture Every Frame” and “Capture on Movement” bools on true
Compile and save the actor

💻 Setting up the material
Open the material by double clicking it
Disconnect this pin

In the details panel, hover over the “Material Domain” setting and select “User Interface”

Connect “RGB” with “Final Color”
Info: It could happen that now an error shows.
If that is the case, select linear color as the Sampler Type


Apply and save the material

💻 Setting up the window
Go into any blueprint, call the subsystem and from there, call the “Create Window” node.
Make the Window Settings struct
Click on the arrow to expand the struct to see more settings
Make the Advanced Border Settings Struct
Make the Size Restriction Settings Struct and expand it
Make the Bool Values Struct and expand it

Now you can see all the settings for creating a window. If you want to know more about what each settings does, make sure to check out the Window Settings struct
💻 Final Tweaks
Spawn the blueprint in your level. You can also dynamically spawn it using the “Spawn Actor from Class” node or you can attach it to anything to have a moving scene. In this example, I am just adding the blueprint to my level and inside the actor blueprint I added the following code so it moves slightly

In the blueprint you created the window, right click on the event graph. Search for “Resize Render Target 2D” and select it
Connect this node at the end of the other stuff. Select the render target we created earlier and make sure to set the same size as the window
Assign an event on resized and also set the render target size there
🙏 Final Words
Now we are finished. You can resize the window and the resolution will be the same as the window.

Are you enjoying this plugin? Then don’t forget to leave a review to support the creator!
Last updated
