Rewarded Video #

Listing available placements #

You can list available placements.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
foreach (var placement in economySystem.Placements)
{
    Debug.Log($"Placement {placement.Id}. Rewards:");
    
    foreach (var currency in placement.Reward.Currencies)
    {
        Debug.Log($"{currency.Key}: {currency.Value}");
    }
    
    foreach (var energy in placement.Reward.Energies)
    {
        Debug.Log($"{energy.Key}: {energy.Value}");
    }
}

Starting a placement #

You can start a placement for the user.

1
2
var placementStatus = await economySystem.PlacementStartAsync("<placementId1>");
Debug.Log($"Placement {placementStatus.PlacementId} created at {placementStatus.CreateTime}");

Getting a placement status #

You can get the status for a placement.

1
2
var attemptCount = 1;
var placementStatus = await economySystem.PlacementStatusAsync("<placementId1>", "<rewardId1>", attemptCount);

You can optionally poll for a placement status instead.

1
2
3
uint attempts = 5u;
uint interval = 5000u;
economySystem.PollPlacementStatusAsync("<placementId1>", "<rewardId1>", attempts, interval);