Skip to main content
The Campaign namespace gives you read-only access to the overarching campaign that contains the currently running level. Use it to query the campaign’s structure — episodes, level lists, completion records — or to read and write campaign-wide save data via Campaign.globalData. All variables are read-only unless noted.

Variables


Functions

getEpisode

Returns a CampaignEpisode by its zero-based index or by its name.

hasEpisode

Returns true if an episode with the given name exists in the campaign.

getNormalLevelByNumber

Returns the CampaignLevel whose sequential number matches number. Normal level numbers are one-based and count across all episodes.

CampaignEpisode

A CampaignEpisode object represents one episode inside the campaign. You obtain one via Campaign.getEpisode() or by iterating Campaign.episodes.

Properties

Methods


CampaignLevel

A CampaignLevel object represents a single level entry within an episode. You obtain one from a CampaignEpisode method, from Campaign.getNormalLevelByNumber(), or from Campaign.firstNormalLevel.

Properties


CampaignCompletionState

Campaign.completionState is a CampaignCompletionState object. Use it to query or update persistent completion records for any level.

Query methods

Update methods

For bulk updates, create an UpdateLevelRequest and apply it in one call:

Usage Example