I have tried to make a copy of the screen to a texture what added to a material plane mesh.
this is added to the screen too. (PIP Screen)
mymaterial.mainTexture = mytexture;
mytexture.ReadPixels (Rect(0,0,480,320),0,0,false);
mytexture.Apply(false);
it works fine in Editor and the PIP Screen shows the last rendered screen of the game.
But on iPhone after building the project, the PIP Screen doesn’t updates the frames or don’t copy the last screen to texture. Only the first Screenframe was copied. why ?
in editor works fine…
Eric5h5
November 10, 2009, 3:27pm
2
ReadPixels doesn’t work on the iPhone.
–Eric
are you sure ?
the first displayed-screen will successfully copied with readpixels on iPhone. Only the latest frames of the scene not. And I get no errors ?
Eric5h5
November 10, 2009, 3:38pm
4
thanks! this is bad, very bad!
this was my one way to grab the screen.
two questions about ReadPixels 2008 and 2009. But still no iPhone-support…
it is very angry to having no chance to make this.
-ReadPixels is not supported
-RenderTexture is not possible
exist maybe other solution to solve this problem ?
I don’t want to switch to an other engine for this one project.
Eric5h5
November 13, 2009, 4:55am
7
The answer in the other topic of “ReadPixels is not supported yet” implies that it will be supported at some point in the future, so you could wait a while and see what happens.
–Eric
You could do something along the line what payback did and render some stuff on cpu and put the final output in a texture through setpixels.
But other than that, there is little options as you can not get the hardware rendered content into a texture.
very interesting. Exist a example for this ?
I have no Idea how to make this with Unity.
It is enough for me when I can render the scene in a Texture.