Study a lot of ways of networking, even the tcp/ip,shock,http of the relationship is clear, and finally figure out how to use GET or post in unity to communicate, or a little excited, but do not rule out a better way, heard unity can write their own shock. I have not done any research here, it is to use Unity's own WWW class to achieve.
This is a relatively simple way, just pass the URL, there are many ways to further data transmission, and so on.
I packed a CS .... Available for use, with the Momo learning ...
usingUnityengine;usingSystem.Collections; Public classWebTest {#regionSingle-Instance classPrivate StaticWebTest minstance =NewWebTest (); Public StaticWebTest Instance {Get{returnminstance;} } #endregion /// <summary> ///Send Read Message/// </summary> /// <param name= "url" >the URL to access</param> /// <returns>wait for return data</returns> PublicIEnumerator Resmessage (stringURL) {WWW www_instance=NewWWW (URL); yield returnwww_instance; if(Www_instance.text = =NULL) {Debug.logerror ("NULL!"); } Else{Debug.Log (www_instance.text); } }}
Unity Networking Quiz (WWW)