- Home /
How to use js to add an camera target texture to an objects's renderer.materials
Purpose: I could select the screen content in different camera. Like: I press button 1, the camera 1 target texture is on the screen, when i press button 2, the camera 1 target texture is replaced by camera 2's target texture.
What I do: Now i create 3 cameras in different view point. And now i write the script that each one with one camera target texture.
Problem: When I assign the texture to the screen's texture. It get error.
Any solution?
What about changing the view by just move the camera to different position? or any other better suggestion?
Many thansk!
Answer by Bunny83 · Apr 16, 2011 at 11:57 AM
what do you mean by "screen's texture"? If you want to use a render-texture you need Unity pro. If you assign a render texture to a camera (target texture) the camera doesn't render to the screen but into the texture. If you just want to switch between the cameras use .enabled
to enable/disable cameras. Make sure you only have one camera active that renders to the screen (ie. has no rendertexture)
Answer by AngryOldMan · Apr 16, 2011 at 12:01 PM
in edit ~> project ~> render settings you can assign a skybox material...is that what you're after? Or could you post the code that gets errors?
Your answer
Follow this Question
Related Questions
Missing Targets 1 Answer
How to make camera position relative to a specific target. 1 Answer
Lock On Reticle 1 Answer
Changing Free Look Camera Target At Runtime 2 Answers
Extra camera rotation 2 Answers