位置: 编程技术 - 正文
推荐整理分享Unity3D之Get与Post(unity getint),希望有所帮助,仅作参考,欢迎阅读内容。
文章相关热门搜索词:unity getkey,unity3d getcomponent,unity getcomponents,unity gettype,unity get post,unity get post,unity get,unity get post,内容如对您有帮助,希望把文章链接给更多的朋友!
转载自: 转载自Cocos2D开发网–Cocos2Dev.com,谢谢!
原文地址: view plaincopyusing UnityEngine; using System.Collections.Generic; using System.Collections; public class WebManager : MonoBehaviour { // Use this for initialization void Start () { // Request by get StartCoroutine(Get(" // Request by post Dictionary<string, string> dic = new Dictionary<string, string> (); dic.Add("userId", ""); dic.Add("eventId", ""); StartCoroutine(Post(" dic)); } // Update is called once per frame void Update () { } // Post IEnumerator Post(string url, Dictionary<string, string>postData) { WWWForm form = new WWWForm(); foreach(KeyValuePair<string, string> postArg in postData) { form.AddField(postArg.Key, postArg.Value); } WWW www = new WWW(url, form); yield return www; if (www.error != null) { Debug.Log("error is :" www.error); } else { Debug.Log("request result :" www.text); } } // Get IEnumerator Get(string url) { WWW www = new WWW (url); yield return www; if (www.error != null) { Debug.Log("error is :" www.error); } else { Debug.Log("request result :" www.text); } } }
unity3d移动平台性能优化():对比法优化 有了上一个专题的经验,我决定通过和盗梦英雄对比来测试消耗性能的点。面板上的已经处理了,但战斗中确实还是差了帧左右的感觉。而且我们的卡
Unity学习之路 转载自:
Unity导入新资源时闪退 Unity闪退,今天遇到一个问题,新更新了项目工程,有新资源加入,但是在打开工程,导入新资源的时候闪退,必闪,解决方法是删除项目工程下的Librar
标签: unity getint
本文链接地址:https://www.jiuchutong.com/biancheng/378767.html 转载请保留说明!上一篇:Unity3D之iTween
友情链接: 武汉网站建设