I use c# and have a problem about namespace System.Drawing!

using System.Drawing;

I edit references and add System.Drawing in it!
Monodevelop have no problem!
But why unity3d have error:
Assets/showpicture.cs(6,14): error CS0234: The type or namespace name Drawing' does not exist in the namespace System’. Are you missing an assembly reference?
I have System.Drawing in the project’s references !Why?
Do unity3d not support this namespace ? And how to make a stream with picture to a texture or jpg by unity3d?

Unity3D does not support System.Drawing. Tripped me up the time I tried that when I first came to Unity many moons ago.

And how to make a stream into a texture or a picture like jpg or mpg by unity3d?

I’m not sure what you are trying to do, but it seems like you are trying to load images similar to a game GUI window.

This may help:

code:
WebResponse result=null;
WebRequest req=WebRequest.Create(url);
result=req.GetResponse();
Stream ReceiveStream=result.GetResponseStream();
ps:
url is a link for a picture!
question:
How to display ReceiveStream as a textrue?It’s I am trying to do !Please help me!Thanks!

if u have a link of a url, try this…

Texture2D tex = new Texture2D(4, 4);
public string url = “http://images.earthcam.com/ec_metros/ourcams/fridays.jpg”;

IEnumerator LoadImage() {
WWW www = new WWW(url);
yield return www; ///Wait until image download complete
tex.material.mainTexture = www.texture; //load image in texture to tex
}

Try this…

Texture2D tex = new Texture2D(4, 4);
public string url = “http://images.earthcam.com/ec_metros/ourcams/fridays.jpg”;

IEnumerator LoadImage() {
WWW www = new WWW(url);
yield return www; ///Wait until image download complete
tex.material.mainTexture = www.texture; //load image in texture to tex
}

I have used WWW class before asked this question!Your answer work well on any platform but phone access internet with GSM ISP’s proxy.Also our team want to use TCP to make game.WWW class use HTTP as I know.So I just want to know the converting between stream and object(Or resources like picture(jpg,mgp)).

Up!

Through the stream, if you will get some byte data. You could then use the Texture2D.LoadImage to retrieve the jpg or png data for use in the game.

If you had raw byte data, you could create a new Texture2D and set the information using Texture2D.SetPixels. All you would have to do is to convert the byte data to colors using the System.BitConverter class. Remember to apply the changes before using it.