- Home /
How to render Camera's view on the flat mesh (plane/etc)
Like title says. Is there any way to do this?
Answer by robertbu · Aug 11, 2014 at 02:02 PM
For a specific camera, you need to use a RenderTexture, which is a Unity Pro feature. Applying it to a mesh, means setting the texture in the material on that mesh. Here is an answer that talks about getting a Texture2D from a RenderTexture.
http://answers.unity3d.com/questions/9969/convert-a-rendertexture-to-a-texture2d.html
If you don't have Pro, you can use Texture2D.ReadPixels() to read the entire screen (not just one camera's view). Here is an answer that talks about using ReadPixels:
http://answers.unity3d.com/questions/279318/using-screenshot-as-texture.html
Note ReadPixels is slow and not something you want to do every frame.
I don't know why you need this functionality, but the is one alternative to ReadPixels(), you can use Application.CaptureScreenshot() to write a copy of the screen to disk and then read it back in. Again, it is a whole display solution, not a specific camera solution.
Answer by Entwicklerpages · Aug 11, 2014 at 02:06 PM
I'm not sure if I have understand your question correctly. Please write next time a little bit more.
I think you want to know how to get the rendered texture and put it on another object to achive a "Monitor in a Monitor" effect.
If yes, look at Render Textures. They need Pro but they are what you need. If you have free, there are also some ways but they need more performance then render textures. Maybe try out Texture2D.ReadPixels.
Read this article for more informations. Scroll down to the second topic.
Hope I helped you.