Unity3d 通过网页下载资源

来源:互联网 发布:numpy 矩阵运算 编辑:程序博客网 时间:2024/05/22 17:09
function Start () {    // The sql statement translate to webpage to return a recordvar sql_text:String = "select * from equipment,image where self_name = '" + self_name + "' and equipment.modelid=image.modelid and used = 1";    //Call webPage    Application.ExternalCall("ProcessDeviceSQL",sql_text,self_name);}//Accept the device descriptionfunction ReceiveParam(param:String){var temp = param.Split('@'[0]);//将传过来的参数以@字符分割成数组content_text = System.Text.RegularExpressions.Regex.Unescape(temp[0].ToString());StartCoroutine(DownPic(temp[1].ToString()));}function DownPic(url){    var www:WWW = new WWW(url);yield www;content_pic = www.texture;}