unity_ads_plugin 0.0.1 copy "unity_ads_plugin: ^0.0.1" to clipboard
unity_ads_plugin: ^0.0.1 copied to clipboard

outdated

Unity Ads plugin for Flutter Applications (Android).

unity_ads #

Unity Ads plugin for Flutter Applications (Android).

Getting Started #

1. Initialization: #

UnityAds.init(gameId: "game_id", testMode: true);

Set your Game id. For testing purposes set testMode to true.

2. Show Banner Ad: #

[Banner Ad]

Place UnityBannerAd widget in your app.

UnityBannerAd(
  placementId: "banner_placement_id",
)

3. Show Rewarded Video Ad: #

[Rewarded Video Ad]

UnityAds.showVideoAd(
  placementId: 'rewarded_video_placement_id',
  listener: (state, args) {
    if (state == UnityAdState.complete) {
      print('User watched a video. User should get a reward!');
    }
    if (state == UnityAdState.skipped) {
      print('User cancel video.');
    }
  },
);

4. Show Interstitial Video Ad: #

[Interstitial Video Ad]

UnityAds.showVideoAd(
  placementId: 'video_placement_id',
  listener: (state, args) {
    if (state == UnityAdState.started) {
      print('User started watching the video!');
    }
  },
);