Documentation

Unicontent

Unicontent is a cross platform Unity® solution for serving downloadable content, featuring:

  • Robust background downloads that continue when your App isn't running, across network outage and device restarts
  • A flexible permissions system that makes it easy to offer season passes to paying users
  • Full Editor support; test your integration without deploying to device
  • A truly cross platform content delivery API
  • Cross platform content management from a single dashboard

The following snippet illustrates the download of a paid expansion episode, and works across all supported platforms.

                            
Unicontent.OnDownloadComplete += (bundleId, directory) => {
    // Use your content!
    // Eg Directory.ListFiles(directory)...
};

// In this case our content is paid.
// Unibill provides the purchase receipt.
Unicontent.Download("episode2", receipt);
                            
                        

Pricing

Charges are accrued per GB of data transferred in a tiered structure; the more you use, the cheaper it becomes.

Note that the pricing varies depending on the geographic location of your users; it costs more to serve users in the Asia Pacific region than it does users in the US and EU.

Contact us for detailed pricing information and a free trial.

Sign Up

Sign up, configure and upload your content at unibiller.com

Getting Started

Configuring a Content Identifier

Each piece of downloadable content has a unique content identifier, specified by you, that you will use to refer to it when using the Unicontent API.

Content identifiers can consist of lowercase letters, numbers and periods, eg 'episode2'.

Uploading your content

Your content is uploaded in zip format using the Unicontent dashboard. It will be automatically unpacked by the Unicontent client when downloaded, and can consist of arbitrary files and folders.

You can upload a different version of your content to be served to each different platform, and uploads become live as soon as they have finished.

Initialising Unicontent

This should only be done once when your App launches, after you have registered for Unicontent's events. Initialisation is synchronous.

    
Unicontent.Initialise();
    

Initiating a download

    
Unicontent.Download("episode2");
    

On Android and iOS, downloads will continue if your App is backgrounded or killed by the OS.

You do not to be concerned with connectivity before making this call; downloads will commence as soon as connectivity is available.

Receiving download notifications

    
Unicontent.onDownloadProgressedEvent += (bundleId, progress) => {
    // bundleId identifies our download, eg 'episode2'
    // progress is an integer between 0-99.
};
    

Handling completed downloads

    
Unicontent.onDownloadCompletedEvent += (bundleId, filePath) => {
// bundleId identifies our download, eg 'episode2'
// filePath tells us where our unpacked content is.
};
    

Querying for downloaded content

Use this to determine if a piece of content is downloaded and available.

    
bool downloaded = Unicontent.IsContentDownloaded("episode2");
    

Accessing downloaded content

Use this to get the local path of downloaded content.

    
string filePath = Unicontent.GetDownloadableContentPathFor("episode2");
    

Permissions

Configuring permissions

Content can be restricted to the owners of one or more In App Purchases; for example, one could have an additional episode that can be purchased via an In App Purchase or via a season pass entitling a user to all episodes.

You then need to configure permissions on that piece of content to grant the In App Purchase holders access, accessible via the content's 'Permissions' button.

Providing proof of purchase

When content is restricted to paid users you are responsible for providing the correct purchase receipt to Unicontent, which Unibill can provide.

    
// Assuming episode2 has already been purchased.
var receipt = Unibiller.GetPurchasableItemById("episode2").receipt;
Unicontent.Download("episode2", receipt);
    

Support

Please direct all support queries to support@outlinegames.com