title: How to convert System.IO.Stream into a Texture in Unity for Android?
body: <p>I'm building a client-side Android app in Unity, and when it downloads a jpg from an AWS S3 server, the result comes back as a System.IO.Stream.</p>
  
  <p>However my limited knowledge of Mono and .Net means that I'm struggling to figure out how to turn this System.IO.Stream blob of data into a Texture in Unity, that I can then set on a quad in my scene.</p>
  
  <p>I've seen promising examples of code online like: <code>var img = Bitmap.FromStream(stream);</code>
  yet System.Drawing.Bitmap is not supported in Unity for Android as far as I can tell - does anyone have any suggestions? </p>
  
  <p>Thanks in advance!</p>
  
  <p>(The exact example code I'm using to download from AWS S3 is the GetObject() function that can be found here <a href="http://docs.aws.amazon.com/mobile/sdkforunity/developerguide/s3.html" rel="nofollow">http://docs.aws.amazon.com/mobile/sdkforunity/developerguide/s3.html</a>, but in their example they use a System.IO.StreamReader which only works with reading in text not byte data for images)</p>