Unity download from FTP

本文关键字:FTP from download Unity | 更新日期: 2023-09-27 18:03:23

我有一个包含一堆文件的FTP,它是由用户和密码保护的。

我正试图从中提取图像并将其分配给几何图形。

这是我使用的代码

 public static IEnumerator urlTexture(){
     string url = "ftp://username:password@HOST_IP/images/00013/01_01.jpg";
     Debug.Log ("Request sent");
     GlobalVariables.myUrl [1] = new WWW (url_left);
     yield return GlobalVariables.myUrl [1];
     }

每当我从http地址提取图像而无需提供凭据时,此代码都可以正常工作。凭据是正确的,但就是不能工作。

如果我得到Url[1]。Url并粘贴它在我的浏览器(firefox和chrome)中返回的字符串,它工作得很好。

关于为什么它不能从Unity工作的线索吗?

非常感谢

Unity download from FTP

从WWW类描述中读取:

备注:http://, https://和file://协议在iPhone支持。ftp://协议支持仅限于匿名下载。不支持其他协议

来源:http://docs.unity3d.com/ScriptReference/WWW.html