【发布时间】:2015-01-12 03:04:58
【问题描述】:
我正在尝试下载已上传到 Parse 核心的文件。 (我正在使用 Parse Unity SDK)
我有一个名为“DLC”的 Parse 表来存储所有可下载的文件。 但现在我不知道如何从应用程序本身下载它。
这些是我的代码,我卡住了
void GetParseFiles()
{
ParseQuery<ParseObject> query = ParseObject.GetQuery("DLC");
query.FindAsync().ContinueWith(t =>
{
if (t.IsCompleted)
{
IEnumerable<ParseObject> results = t.Result;
int count = 0;
foreach(ParseObject obj in results)
{
ParseFile parseFile = obj.Get<ParseFile>("LevelFiles");
WWW request = new WWW(parseFile.Url.AbsoluteUri);
// what should I do in order to get the content of the file?
}
Debug.Log(count);
}
else
{
Debug.Log("Failed");
}
});
}
希望有人能告诉我该怎么做? 我想要实现的是我想将一些数据文件(以 .txt 或 .xml 格式)存储到 Parse 服务器,然后其他用户将从那里获取数据文件。
【问题讨论】: