- Home /
Question by
syenet · Jun 27, 2016 at 03:22 PM ·
editorgraphicsrendertexture
How to blit a rendertexture to screen(GameView in Editor)?
I use the Graphic.Blit with null target parameter like this:
void Update ()
{
rt.DiscardContents ();
RenderTexture curRT = RenderTexture.active;
RenderTexture.active = rt;
mainCam.targetTexture = rt;
mainCam.Render ();
mainCam.targetTexture = null;
RenderTexture.active = curRT;
Graphics.Blit (rt, null as RenderTexture);
}
In Built Player it's working, but in Editor the display1 of GameView says "No Cameras Rendering":
and the Camera is set like this:
I need to see and debug in the Editor without building a player, so what possibly could be the problem?
my platform is WIn7 64bit and Unity Pro 5.4.0 b20
Thanks in advance.
unnamed-qq-screenshot20160627115709.png
(11.7 kB)
unnamed-qq-screenshot20160627115735.png
(42.9 kB)
Comment
Your answer
Follow this Question
Related Questions
Render a camera multiple times in a single frame? 1 Answer
How do I add/draw a sprite? 1 Answer
modify textures at runtime? 3 Answers