Hey there i apologize in advance for my bad english,
im using a c# script to launch and update my game. I have stored my patch .pak on dropbox (have tried googledrive) and using a wbclient and the sharing url of the dropbox file to download it. But my code just says it downloads sth and creats a file with the correct name but missing data. File should be 2,5MB but 350KB.
My code:
if (currentVersion.CompareTo(newVersion) < 0)
{
using (client = new WebClient())
{
client.DownloadFileCompleted += new AsyncCompletedEventHandler(DownloadCompleted);
client.DownloadProgressChanged += new DownloadProgressChangedEventHandler (DownloadProgressChanged);
Uri uri = new Uri(url);
string fileName = System.IO.Path.GetFileName(uri.AbsolutePath);
client.DownloadFileAsync(uri, Application.StartupPath + "/ShooterTry5/Content/Paks/" + fileName);
updatedVersion = newVersion.ToString();
T_DownloadPercent.Visible = true;
T_Downloaded.Visible = true;
T_Remaining.Visible = true;
T_DownloadSpeed.Visible = true;
sw.Start();
}
}
else
{
T_DownloadPercent.Visible = true;
T_DownloadPercent.Text = "100%";
PB_Download.Value = 100;
}
the url varible is just dir sharelink from dropbox.
If you need more information ore code just aks i will provide everything.
Thanks in advance.
And im apolo