AIR Flash Unity3D

Send texture from unity to flash via sockets.

For last project i was need show part of main display to distant big screen, connected to another PC. So i need somehow send video feed via Ethernet. Firstly i tried find any encoder lib for sending h264 video, but this was so complicated. So i did small Socket server in adobe air for this distant big screen PC and wrote some code in c# for unity client.

There is 2 ways for sending images to flash via sockets.

1. Send uncompressed bitmap data (ARGB = 4 bytes) from Unity and then use bitmapData.setPixels(rect, byteArray) for recteate bitmap
2. Convert bitmap data into PNG in Unity via Texture2D.EncodeToPNG and them use Loader.loadBytes() in flash.

some code below

AIR Flex

Apollo : LJ Big Brother

Small Apollo app allow filter posts stream in realtime.


download here