예제 #1
0
    /// <summary>
    /// 下载资源完成的回调
    /// </summary>
    /// <param name="filePath"></param>
    private void OnDownloadAssetFinish(bool rs)
    {
        if (!rs)
        {
            Debug.LogError("Download error");
        }

        string fileName = storageManager.GetFileNameFromAsset(currentAsset);
        string filePath = StorageManager.GetFilePath() + fileName;

        Debug.Log("Asset at " + filePath);

        if (filePath == null)
        {
            Debug.LogWarning("Download file Failed!");
            return;
        }

        storageUI.HideLoading();
        storageUI.HideUI();

        cursor.isBusy = true;

        // 下载完毕,开始加载资源并显示
        LoadAssetFromFile(fileName);
        //StartCoroutine(LoadAsset(filePath));
    }
예제 #2
0
    /// <summary>
    /// 下载资源完成的回调
    /// </summary>
    /// <param name="filePath"></param>
    private void OnDownloadAssetFinish(string filePath)
    {
        Debug.Log("Asset at " + filePath);

        if (filePath == null)
        {
            Debug.LogWarning("Download file Failed!");
            return;
        }

        storageUI.HideLoading();
        storageUI.HideUI();

        cursor.isBusy = true;

        // 下载完毕,开始加载资源并显示
        LoadAssetFromFile(filePath);
        //StartCoroutine(LoadAsset(filePath));
    }