Capturing UI to render texture

Hi,

In order to capture UI with render texture I had to write the following code:

var rt =RenderTexture.GetTemporary(1024, 1024);
tilesCamera.targetTexture = rt;

yield return new WaitForEndOfFrame();
yield return new WaitForEndOfFrame();
tilesCamera.Render();

RenderTexture.active = rt;

RenderTexture.active =null;
RenderTexture.ReleaseTemporary(rt);

Notice duplicate call to WaitForEndOfFrame before Render.

In my case this is not critical as I don’t use contents real-time. I guess it could be painful in other scenarios.
Is this by design?

Tomas

This has been fixed. not sure when it’ll go public though

It’s waiting in a branch now. Looking like 4.6.1p2