【问题标题】:How to download list of files from Parse如何从 Parse 下载文件列表
【发布时间】: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 服务器,然后其他用户将从那里获取数据文件。

【问题讨论】:

    标签: unity3d parse-platform


    【解决方案1】:

    我在这里找到了答案..

    如果我需要在功能块中放置一个 yield 语句,我不应该使用 ContinueWith。

    https://parse.com/questions/unity-after-i-uploaded-a-jpeg-as-a-parsefile-using-the-data-browser-how-can-i-retrieve-and-display-it-from-unity-with-c-code

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多