Unity web player-----a new version is required/insatall manually

前几天同事让unity导出个网页版的,我说肯定没问题,以前导出过,可是导出后诡异的问题出现了,居然浏览器打不开,不能运行,出现的错误各种各样,比如下图所示:

A newer version of Unity Web Player is required,but the auto-update failed. Invalid auto-update file format. ...

还有一点击就下载C:\Users\*****\Downloads\Compressed\UnityPlayer3.x.x-win32.zip,C:\Users\Bella Lv\Downloads\Compressed\UnityPlayer5.x.x-win32.zip等的情况,参照网上的各种方法和咨询小伙伴大神们的各种方法尝试:

方法一:换不同版本的unity web player 安装,装了4.6,5.3.0,5.3.1,5.3.2都试了一遍没用

方法二:清除浏览器缓存还装了CCleaner的软件清理

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
unity web playerWeb Player License Agreement PLEASE READ CAREFULLY: BY INSTALLING THE SOFTWARE (AS DEFINED BELOW), YOU (EITHER ON BEHALF OF YOURSELF AS AN INDIVIDUAL OR ON BEHALF OF AN ENTITY AS ITS AUTHORIZED REPRESENTATIVE) AGREE TO ALL OF THE TERMS OF THIS END USER LICENSE AGREEMENT REGARDING THE USE OF THE SOFTWARE. 1) GRANT OF LICENSE: You may install this Software on your computer to experience Unity web content. 2) TITLE: You acknowledge that no title to the intellectual property in the Software is transferred to you. Title, ownership, rights, and intellectual property rights in and to the Software shall remain that of Unity Technologies. The Software is protected by copyright laws of the United States and international treaties. 3) ANONYMOUS USAGE STATISTICS: You accept that the first time the Unity Web Player is used, anonymous information about the computer it's loaded on is submitted to Unity Technologies ApS. This only happens once time, and contains no personally identifiable information. The information submitted is: (a) Operating system and version (b) The make of the CPU, and number of CPUs present (c) The graphics card type and vendor name (d) Graphics card driver name and version (example: "nv4disp.dll 6.10.93.71") (e) Which graphics API is in use (example: "OpenGL 2.1" or "Direct3D 9.0c") (f) Amount of system and video RAM present (g) Current desktop resolution (h) Version of the Unity Web Player (i) A number describing whether running on Mac or Windows (j) A checksum of all the data that gets sent to verify that it did transmit correctly 3) DISTRIBUTION: You acknowledge that only Unity Technologies ApS and its designated distribution partners may distribute the Unity Web Player, without a special permission.
Unity中进行multipart/form-data上传,可以使用UnityWebRequest类。具体步骤如下: 1. 创建一个UnityWebRequest对象,并设置请求的URL和请求方法为POST。 2. 设置请求头部信息,包括Content-Type为multipart/form-data,以及其他必要的信息。 3. 构造表单数据,将需要上传的数据按照multipart/form-data格式进行编码,并设置到UnityWebRequest对象中。 4. 发送请求,并等待服务器响应。 以下是一个示例代码: ``` IEnumerator UploadFile(string url, byte[] data) { UnityWebRequest request = new UnityWebRequest(url, "POST"); request.SetRequestHeader("Content-Type", "multipart/form-data; boundary=------------------------boundary"); string boundary = "--------------------------boundary"; byte[] formHeaderBytes = System.Text.Encoding.UTF8.GetBytes("\r\n--" + boundary + "\r\nContent-Disposition: form-data; name=\"file\"; filename=\"test.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n"); byte[] formFooterBytes = System.Text.Encoding.UTF8.GetBytes("\r\n--" + boundary + "--\r\n"); byte[] bodyBytes = new byte[formHeaderBytes.Length + data.Length + formFooterBytes.Length]; System.Buffer.BlockCopy(formHeaderBytes, 0, bodyBytes, 0, formHeaderBytes.Length); System.Buffer.BlockCopy(data, 0, bodyBytes, formHeaderBytes.Length, data.Length); System.Buffer.BlockCopy(formFooterBytes, 0, bodyBytes, formHeaderBytes.Length + data.Length, formFooterBytes.Length); request.uploadHandler = new UploadHandlerRaw(bodyBytes); request.downloadHandler = new DownloadHandlerBuffer(); yield return request.SendWebRequest(); if (request.result == UnityWebRequest.Result.Success) { Debug.Log("Upload complete!"); } else { Debug.Log("Error during upload: " + request.error); } } ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值