- Home /
Question by
ZDFDigital · Aug 03, 2016 at 07:18 AM ·
editorrendertexture
Camera doesn't render to RenderTexture in editor.
Hi,
in my game I have a camera that renders to a RenderTexture like this:
renderTexture = new RenderTexture ((int)size.x, (int)size.y, 32);
GetComponent<Camera> ().targetTexture = renderTexture;
When it renders on the device it's fine. When it renders in the editor it looks like this:
Is there anything I can do about that? I tried to change the texture depth and all that but to no success.
The thing is, that I can't continue on my project now because of said problem.
Thanks for your help in advance.
Greetings, Andreas
rendertextureproblem.png
(78.4 kB)
Comment
Best Answer
Answer by ZDFDigital · Aug 03, 2016 at 07:37 AM
Turns out that you can't have the camera's clear flags set to "Don't clear" but to a transparent solid color.