How to download a file from Gamedonia [Unity]

You can manage DLCs you want to add to your game as files that are available for the users to download. First of all upload a file to the Gamedonia Dashboard in the Files section.

Write down the FILE_ID of the file you want to download and then add this code to your Unity class:

// attach event handlers on the script Start() function.
public void Start()
{
    GamedoniaFiles.Instance.DownloadDidFinishLoading += (object sender, DownloadManagerEvent e) => {
        Debug.Log("File " + e.Download.FileId + " download finished correctly.");
    };
 
    GamedoniaFiles.Instance.DownloadDidStart += (object sender, DownloadManagerEvent e) => {
        Debug.Log("Download start: " + e.Download.Filename);
    };
}
 
public void DownloadClick()
{
    // we can add as much files to download as we want.
    GamedoniaFiles.Instance.AddDownloadWithFileId("FILE_ID");
    // after adding files to the download list, we must start the download.
    GamedoniaFiles.Instance.Begin();
}

The location of the downloaded file will depend on the platform your game is running on. Check the Downloadable Content guide for more information on how to pause and resume downloads.

More info here: Downloadable Content guide