Rewarded ads
Grant a reward after a successful ad view.
Call rewardedBreak() and wait for the result. In this example, GameServices.Rewards is the game service that grants the reward. If the ad might finish after the scene closes, check that the scene is still open.
const result = await this.engine.platform.rewardedBreak();
if (result.success) {
this.getSceneService(GameServices.Rewards).grant();
}
success: trueGrant the reward
success: falseThe player continues without a reward