Tutorial by Examples

Get

Get is getting data from web server. and new WWW("https://urlexample.com"); with a url but without a second parameter is doing a Get. i.e. using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public string url = "http://google.com"...
Every instance of WWW with a second parameter is a post. Here is an example to post user id and password to server. void Login(string id, string pwd) { WWWForm dataParameters = new WWWForm(); // Create a new form. dataParameters.AddField("username", id); dataParameter...
Upload a file to server is also a post. You can easily upload a file through WWW, like the below: Upload A Zip File To Server string mainUrl = "http://server/upload/"; string saveLocation; void Start() { saveLocation = "ftp:///home/xxx/x.zip"; // The file path. ...
There are many ways to communicate with servers using Unity as the client (some methodologies are better than others depending on your purpose). First, one must determine the need of the server to be able to effectively send operations to and from the server. For this example, we will send a few pie...

Page 1 of 1