Advertisement

How to make a monitor?

Started by June 20, 2016 08:57 PM
2 comments, last by Somar 8 years, 6 months ago

Greetings gamedev.net,

I today was wondering how I would go to make a monitor display the image being captured by a camera in Unity.

[spoiler]explanation_zpsst0eiraa.png

[/spoiler]

I don't want to replace the main camera. In fact I want the main camera to be able to see this footage from a second camera.

I know that it is advanced Unity working. I have read it in many articles, but I didn't found any tutorial on doing this. Any help?

Render to a texture, and apply that texture to the monitor.

My internet is being super shoddy due to bad weather, or I'd try to find some links. Googling based on what I said should get you started.

Hello to all my stalkers.

Advertisement

I will provide a bit more detail, but it is Lactose! said.

1. Make a new Render Texture in the project folder.

2. Make a material, probably something either with an emission texture, or for texting purposes use the Unlit/Texture shader.

3. Drag the Render Texture into the texture of the material.

4. Make your plane(or if you already have UVmapped geometry) with that material, so you can see the render texture.

5. Make another camera, pointing wherever you want it to. Take the AudioListener component off of the camera so you don't get errors.

6. On that new camera, drag the Render Texture onto the "Target Texture" of the camera.

7. Profit?!?!

That is all I did, took less than a minute in my project to just add it in really quickly. It even works and updates in the editor too.



Thank you guys! That really looks easy. I will give it a try.

This topic is closed to new replies.

Advertisement