Skip to content

Commit

Permalink
Merge pull request #136 from ChartBoost/release/4.2.3
Browse files Browse the repository at this point in the history
Chartboost Mediation Unity SDK 4.2.3 into Develop
  • Loading branch information
SCastanedaMunoz authored May 18, 2023
2 parents 2c02e28 + dd85405 commit 7f03dd0
Show file tree
Hide file tree
Showing 16 changed files with 561 additions and 111 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file using the standards as defined at [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0).

## Version 4.2.3 *(2023-05-18)*
Bug Fixes:
- Fixed an issue with Unity-iOS Rewarded Ads hanging onto the ad instances for too long, potentially causing duplicate callback events.

## Version 4.2.2 *(2023-05-10)*
Improvements:
- Updated `AdaptersWindow.cs` to utilize a more comprehensive JSON schema for better handling of network dependency changes.
Expand Down
30 changes: 28 additions & 2 deletions com.chartboost.mediation.demo/Assets/Demo/Demo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,22 @@ public void OnClearInterstitialClick()
Log("interstitial ad has been cleared");
}

public void OnDestroyInterstitial()
{
if (_interstitialAd == null)
{
Log("interstitial ad does not exist");
return;
}

_interstitialAd.Destroy();
_interstitialAd = null;
Log("interstitial ad has been destroyed");
}

public void OnShowInterstitialClick()
{
if (_interstitialAd.ReadyToShow())
if (_interstitialAd != null && _interstitialAd.ReadyToShow())
_interstitialAd.Show();
}

Expand Down Expand Up @@ -259,10 +272,23 @@ public void OnClearRewardedClick()
_rewardedAd.ClearLoaded();
Log("rewarded ad has been cleared");
}

public void OnDestroyRewarded()
{
if (_rewardedAd == null)
{
Log("rewarded ad does not exist");
return;
}

_rewardedAd.Destroy();
_rewardedAd = null;
Log("rewarded ad has been destroyed");
}

public void OnShowRewardedClick()
{
if (_rewardedAd.ReadyToShow())
if (_rewardedAd != null && _rewardedAd.ReadyToShow())
_rewardedAd.Show();
}

Expand Down
Loading

0 comments on commit 7f03dd0

Please sign in to comment.