• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# UnityEngine.WWWForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中UnityEngine.WWWForm的典型用法代码示例。如果您正苦于以下问题:C# WWWForm类的具体用法?C# WWWForm怎么用?C# WWWForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WWWForm类属于UnityEngine命名空间,在下文中一共展示了WWWForm类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: UpdateWWWForm

		public void UpdateWWWForm(ref WWWForm data)
		{
			if (fieldType == eFieldType.Verify)
				return;

			data.AddField(serverfield, value);
		}
开发者ID:EvilAbyss,项目名称:Wulfram,代码行数:7,代码来源:ServerDataCapture.cs


示例2: SendCoroutine

        public IEnumerator SendCoroutine()
        {
            AddDefaultParameters();

            WWWForm requestForm = new WWWForm ();
            requestForm.AddField ("name", this.eventName);
            requestForm.AddField ("data", this.data.ToString ());
            if (!this.customData.IsNull) {
                requestForm.AddField ("customData", this.customData.Print(false));
            } else {
                requestForm.AddField ("customData", "{}");
            }

            requestForm.AddField ("ts", "1470057439857");
            requestForm.AddField ("queued", 0);
            requestForm.AddField ("debugMode", "true");

            WWW request = new WWW ("https://apptracker.spilgames.com/v1/native-events/event/android/" + Spil.BundleIdEditor + "/" + this.eventName, requestForm);
            yield return request;
            //			while (!request.isDone);
            if (request.error != null) {
                Debug.LogError ("Error getting data: " + request.error);
                Debug.LogError ("Error getting data: " + request.text);
            } else {
                JSONObject serverResponse = new JSONObject (request.text);
                Debug.Log ("Data returned: " + serverResponse.ToString());
                ResponseEvent.Build(serverResponse);
            }
        }
开发者ID:spilgames,项目名称:spil_event_unity_plugin,代码行数:29,代码来源:SpilEvent.cs


示例3: GetNewTrades

        IEnumerator GetNewTrades()
        {
            WWWForm form = new WWWForm();
            form.AddField("_Token", APIKey); //The token
            form.AddField("Symbols", symbols); //The Symbols you want
            DateTimeOffset currentTimeEST = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, easternZone);

            
            form.AddField("StartDateTime", lastUpdatedEST.ToString(timeFormat)); //The proper DateTime in the proper format
            form.AddField("EndDateTime", currentTimeEST.AddTicks(-1000000).ToString(timeFormat)); //The proper DateTime in the proper format
            var url = "http://ws.nasdaqdod.com/v1/NASDAQTrades.asmx/GetTrades HTTP/1.1";

            WWW www = new WWW(url, form);
            yield return www;
            if (www.error == null)
            {
                //Sucessfully loaded the JSON string
                Debug.Log("Loaded following JSON string" + www.text);

            }
            else
            {
                Debug.Log("ERROR: " + www.error);
            }
        }
开发者ID:chen-ye,项目名称:SoundStockUnity,代码行数:25,代码来源:StockManager.cs


示例4: GET

 public WWW GET(string url,WWWForm _form,Action<WWW> action)
 {
     CancelFlag = false;
     WWW www = new WWW(url,_form);
     EditorCoroutine.start(ProcessRequest(www,action));
     return www;
 }
开发者ID:ChetahPangestu,项目名称:MajorProjectReveal,代码行数:7,代码来源:HttpWrapper.cs


示例5: Balance

 /**
  * Authenticated resource which returns the current balance of the developer in Bitcoins
  */
 public void Balance(string email, string pass, Action<JSONObject> success, Action<string> error)
 {
     WWWForm form = new WWWForm();
     form.AddField("email", email);
     form.AddField("pass", Util.Encrypt(pass));
     t.Get("developer/balance", form, success, error);
 }
开发者ID:imclab,项目名称:coinding-api-unity,代码行数:10,代码来源:Developer.cs


示例6: Register

 /**
  * Creates a new player account
  */
 public void Register(string name, string pass, Action<JSONObject> success, Action<string> error)
 {
     WWWForm form = new WWWForm();
     form.AddField("name", name);
     form.AddField("pass", Util.Encrypt(pass));
     t.Post("player/register", form, success, error);
 }
开发者ID:imclab,项目名称:coinding-api-unity,代码行数:10,代码来源:Player.cs


示例7: Post

        public void Post(string url, Action<JSONObject> success, Action<string> error)
        {
            WWWForm form = new WWWForm();
            WWW www = new WWW(api + url, form);

            StartCoroutine(WaitForRequest(www, success, error));
        }
开发者ID:imclab,项目名称:coinding-api-unity,代码行数:7,代码来源:Transport.cs


示例8: Authenticate

        public IEnumerator Authenticate(string gameId, string hostname, int httpPort, string username, string password, Success success, Error error)
        {
            string prefix;
            if (NetworkSettings.instance.httpUseSSL) {
                prefix = "https://";
            } else {
                prefix = "http://";
            }

            string uri = prefix + hostname + ":" + httpPort + "/api/client/login/" + gameId;
            //Debug.Log ("Authenticating via " + uri);
            var form = new WWWForm ();
            form.AddField ("username", username);
            form.AddField ("password", password);
            WWW www = new WWW (uri, form.data, form.headers);
            yield return www;

            if (www.error != null) {
                Debug.Log(www.error);
                error (www.error);
            } else {
                //Debug.Log(www.text);
                Dictionary<string, string> values = JsonConvert.DeserializeObject<Dictionary<string, string>> (www.text);
                success (values);
            }
        }
开发者ID:gamemachine,项目名称:gamemachine,代码行数:26,代码来源:Authentication.cs


示例9: Balance

 /**
  * Authenticated resource which returns the current balance of the player in Bitcoins
  */
 public void Balance(string name, string pass, Action<JSONObject> success, Action<string> error)
 {
     WWWForm form = new WWWForm();
     form.AddField("name", name);
     form.AddField("pass", Util.Encrypt(pass));
     t.Get("player/balance", form, success, error);
 }
开发者ID:imclab,项目名称:coinding-api-unity,代码行数:10,代码来源:Player.cs


示例10: sendBinaryData

 // 如果想通过HTTP传递二进制流的话 可以使用 下面的方法。
 public void sendBinaryData(string url, string str)
 {
     WWWForm wwwForm = new WWWForm();
     byte[] byteStream = System.Text.Encoding.Default.GetBytes(str);
     wwwForm.AddBinaryData("post", byteStream);
     WWW www = new WWW(url, wwwForm);
 }
开发者ID:zhutaorun,项目名称:unitygame,代码行数:8,代码来源:NetLogDevice.cs


示例11: HttpPostRequestProtected

 public HttpPostRequestProtected(string host, string filePath, string user, string password, WWWForm wwwForm)
     : base(host, filePath)
 {
     this.wwwForm = wwwForm;
     this.user = user;
     this.password = password;
 }
开发者ID:Naphier,项目名称:NGTools,代码行数:7,代码来源:HttpPostRequests.cs


示例12: AddParams

		private WWWForm AddParams()
		{
			WWWForm form = new WWWForm();
			form.AddField( GameConstants.REQUEST_KEY_API_KEY, Encryption.API_KEY);
			form.AddField( GameConstants.REQUEST_KEY_TIMESTAMP, "" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond));
			return form;
		}
开发者ID:SonGit,项目名称:NailGame,代码行数:7,代码来源:BaseRequest.cs


示例13: Login

        public void Login(string username, string password)
        {
            WWWForm form = new WWWForm();
            form.AddField("username", username);
            form.AddField("password", password);

            httpService.HttpPost(LOGIN_URL, form, LoginCallback);
        }
开发者ID:maximecharron,项目名称:GLO-3002-Frima,代码行数:8,代码来源:LoginService.cs


示例14: Request

 public void Request(
     Uri url,
     HttpMethod method,
     WWWForm query = null,
     FacebookDelegate<IGraphResult> callback = null)
 {
     AsyncRequestString.Request(url, method, query, callback);
 }
开发者ID:facebook,项目名称:facebook-sdk-for-unity,代码行数:8,代码来源:AsyncRequestStringWrapper.cs


示例15: Queue

 private void Queue(WWWForm data, int frame, float time)
 {
     Log log = new Log();
     log.postData = data;
     log.frame = frame;
     log.time = time;
     logs.AddLast(log);
 }
开发者ID:ovieira,项目名称:Google-Analytics-For-Unity3D,代码行数:8,代码来源:LogQueue.cs


示例16: HttpPostCoroutine

 private IEnumerator HttpPostCoroutine(string location, WWWForm form, Action<WWW> callback)
 {
     WWW request = new WWW(HTTP_SERVER_URI + location, form);
     yield return request;
     Debug.Log(String.Format("HTTP POST Result: {0}", request.text));
     if (callback != null)
         callback(request);
 }
开发者ID:maximecharron,项目名称:GLO-3002-Frima,代码行数:8,代码来源:HttpService.cs


示例17: PostForm

        /**
         * Post form
         */
        public static IEnumerator PostForm(string url, WWWForm formData, Action<WWW> callback)
        {
            WWW request = new WWW(url, formData);

            yield return request;

            callback(request);
        }
开发者ID:Putaitu,项目名称:unity-boilerplate,代码行数:11,代码来源:WebService.cs


示例18: Register

 /**
  * Adds a new game to the network
  */
 public void Register(string name, string dev, string url, Action<JSONObject> success, Action<string> error)
 {
     WWWForm form = new WWWForm();
     form.AddField("name", name);
     form.AddField("dev", dev);
     form.AddField("url", url);
     t.Post("game/register", form, success, error);
 }
开发者ID:imclab,项目名称:coinding-api-unity,代码行数:11,代码来源:Game.cs


示例19: Request

 public static void Request(string url , WWWForm form , byte[] byteData , Hashtable headers ,
     System.Action<string> callback , System.Action<string,System.Action,System.Action> error_callback)
 {
     GameObject obj = new GameObject("HttpRequest");
     HttpRequest loader = obj.AddComponent<HttpRequest>();
     loader.m_eState = STATE.START;
     loader.StartCoroutine(loader.request(url , form , byteData , headers , callback , error_callback));
 }
开发者ID:hhhzaixian,项目名称:Unity3DNetwork-http,代码行数:8,代码来源:HttpRequest.cs


示例20: Register

        public void Register(string username, string password, string email)
        {
            WWWForm form = new WWWForm();
            form.AddField("username", username);
            form.AddField("password", password);
            form.AddField("email", email);

            httpService.HttpPost(REGISTRATION_URL, form, RegistrationCallback);
        }
开发者ID:maximecharron,项目名称:GLO-3002-Frima,代码行数:9,代码来源:RegistrationService.cs



注:本文中的UnityEngine.WWWForm类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UnityEngine.WaitForSeconds类代码示例发布时间:2022-05-26
下一篇:
C# UnityEngine.WWW类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap