- Home /
Screenshare to mobile device
Hello guys,
I've been working on an application which streams the game view to my android phone.
Currently I'm using local UDP connection to push 30 textures a second which works okay with low res. I'm taking the screenshots on my pc with Texture2D.ReadPixels()
, and load them again with Texture2D.LoadImage()
. Without a render texture.
I'm having 2 problems here:
Using Texture2D.ReadPixels(), my fps drops to 20 in an empty scene with just a rotating cube on a fairly high end laptop.
When using high quality screenshots (I compressed the byte array to reduce size, and split the data into 8.000 byte long packages) I get a HUGE delay, altho it only takes max 5 packages to send a frame, at 30 fps = 150 packages a second. Which isn't that bad on a LAN network, right?
So my question: is there any other way to do this? Maybe using .net bitmaps, external software like a C# console app, or python? Because the functionality unity provides me (as far as i know), is just too slow :(
Thanks a lot guys
Your answer
![](https://koobas.hobune.stream/wayback/20220612065139im_/https://answers.unity.com/themes/thub/images/avi.jpg)