Downloadable Content Object

Introduction

The Downloadable Content Object is a scriptable object created by the Steam Settings when you import DLC. This can be used to check if the local user owns a given DLC and to perfrom common actions against that DLC.
Most modern games do not actually download content with DLC rather they are usually only used as license to check if given content in the game should be unlocked.
This is in particular important for multiplayer games where you need all players to have all content in order to play together but want to lock/unlock content based on ownership of DLC aka expansions or modules.
It is however possible to assoceate a depot with DLC and have it actually download additional game content.

Definition

1
public class DownloadableContentObject : ScriptableObject
Copied!
Represents a DLC object, this is created by the Steam Settings object when you import DLC data for your app. To learn more see the Steam Settings object documentation.

Fields and Attributes

Type
Name
Comment
AppId_t
appId
The room this message relates to
bool
IsSubscribed
Indicates rather or not the DLC is currently owned
bool
IsInstalled
Indicated rather or not the DLC is installed

Methods

Get Install Directory

1
public string GetInstallDirectory();
Copied!
Returns the intall location of the DLC

Get Download Progress

1
public float GetDownloadProgress();
Copied!
Returns the download progress if known as a value between 0 and 1

Get Earliest Purchase Time

1
public DateTime GetEarliestPurchaseTime();
Copied!
Gets the time of purchase if known

Install content

1
public void Install();
Copied!
Starts the process of installing the DLC

Uninstall content

1
public void Uninstall();
Copied!
Starts the process of uninstalling the DLC

Open Store

1
public void OpenStore(flag);
Copied!
Opens the Steam Overlay to the Store for this DLC item