Hi folks,
I’m wondering if there is any possibility of getting rid of the WWW class when downloading MovieTexture content from an url? Right now the MovieTexture class doesn’t seem to have a constructor or a Load() function that takes (e.g.) a byte[ ] to load it’s data.
For us it’s mendatory not to use the WWW class for downloading MovieTexture content. This is because we want to avoid the WebPlayer ↔ Browser communication.
No thats not possible. Any loading of movie textures or audio from outside goes through WWW or goes through nothing from Unity. Also I don’t understand the ‘webplayer browser’ communication part. Its not like you would ever get around that, as already loading the webplayer would fail to comply to that and beyond that there is no communication, unity only uses the browsers HTTP connection for WWW to have a consistent experience, have the browsers caching and session handling (otherwise you will not be able to embedded your unity application in a webexperience at all as the session would never be correct thus you lose all user bound stuff) among other things. is there an explicit reason you want to use barebone TCP sockets instead (as system.web does not work)
As there is no way to create a MovieTexture passing a data array into the constructor or any function (I’m pointing out a FEATURE-REQUEST ) , for now there is only one suitable way to solve this issue: We download an asset bundle that contains only the MovieTexture.
All downloadable movies are packed into an asset bundle during our build process. That leads me to another question:
Is there any kind of OnPreMovieTexture? If not → FEATURE REQUEST. Right now our movies are imported twice. 1st. On Editor start, 2nd. On AssetDatabase.ImportAsset using a different quality.