|
Hi
Nicolas,The
devel
|
|
|
|
|
Hi Nicolas,The development I did, sent the bauocrkgnd image from Unity to Flash, but it sounds like you want to send an image from Flash to Unity.The process is basically the same.The method I used, was to render the camera in Unity to a PNG file, then the file data is sent to Flash, via JavaScript in the browser.However you can't send binary data via JavaScript.So the image file data needs to be converted to text i.e UUEncode before it is sent, and the UUEncoded data needs to be decodded back to binary at the other end.But there appears to be a 15k limit to text sent to JavaScript from Unity, so I had to cut the String (of image data) into 15k blocks and send these separately, then re-assemble at the other end.But you cannot do send 15k, send 15k, send 15k, etc because this overloads the JavaScript, so you have to do1.Unity : send 15k2.Unit: Wait for message from flash3.Flash: recieve 15k4.Flash: send OK message: to Unity6 Unity: receives OK message go back to step 1 (until all data is sent)If you are sending from Flash to Unity, you will need to do the same thing, but in reverse.If sending from Flash to Unity, I guess you need to create a material in unity based on the PNG or JPG that you make in Flash, but I don't know how to do that. You'll need to look in the Unity API docs or post to the Unity forumsCheersRogerUnity
|
|
|
|
|
|
|
|
|
(VISITOR) AUTHOR'S NAME Maribel
MESSAGE TIMESTAMP 18 december 2014, 08:19:06
AUTHOR'S IP LOGGED 103.3.188.221
|
|
|
|