I have a camera that overlooks the entire scene, the active render texture renders everything but the terrain, the terrain is in the “default” layer just like everything else, any ideas?
anybody?
I am thinking you may need to access the renderer through your terrain(Unity - Scripting API: Renderer) object and change materials maybe. Just a guess, I haven’t got to that part of development in my own game. Trying to get all the game logic complete before adding in all the art.
Some code and/or picture might clearly show what you are experiencing.
I have an overhead camera that takes a screenshot of the entire scene when it’s called upon:
private RenderTexture returnScreenshot(){
instance.gameObject.active = true; //by default it is not active, so I active
camera.Render(); //render
instance.gameObject.active = false;//deactivate again
return rt; //return the screenshot
}
this works fine, it returns all items on screen except the terrain, all objects are on the default layer
What is being activated and deactivated ther? Is it the terrain?
no that is the camera that takes the screen shot
Are you displaying the render texture on an object or with the GUI? It has been reported that terrains sometimes don’t show up on render textures shown specifically with the GUI and this has been logged as a bug. You may therefore be able to work around this problem by showing the texture on a plane object in the scene.
Anyway, it would be great if you could file a new bug report for this (menu: Help > Report A Bug) and mention that it may be related to case 330283.
This apparently is still a bug in 3.4.