[Free] UnityAds - Integrate unity ads in your application

Unity Ad Extension

This extension will help you to integrate Unity Ads in your MIT AI2 applications.

Get Started :

As this first extension has been discontinued, I've created unity ads extension with latest 4.4.0 library. First of all, you should paste your game id at designer property of the extension or use SetGameId block to set your game id then you have to use Initialize block to initialze sdk, if it is sucessfully initialized then only you are allowed to use other blocks.

  1. Initialize

    You must call this method to initialize the required SDKs. On Successful, It will trigger the event InitializationComplete else it will trigger InitializationFailed event.

    I suggest you call this method on Screen1.initalize. Also, if you initialize this extension on Screen1 then it is no longer a need to initialize on other screens.

  2. InitializationComplete

    This block will be triggered when sdk is sucessfully initialized. Now you can show ads on your app.

  3. InitializationFailed

    component_event (3)
    This block will be triggered on failure of initialization of sdk. You can retry initialization by using Initialize function block.

Interstitial & Rewarded Ads
To show interstitial or rewarded ads then you have to load it first using LoadInterstitialAd or LoadRewardedAd method by providing adUnitId(also called as placement id). If sucessfully loaded then it will trigger AdLoaded event with adUnitId. If failed to load then it will trigger AdFailedToLoad event with adUnitId and error message.
After Ad is sucessfully loaded, you can now show that ad using ShowInterstitialAd or ShowRewardedAd method. On ad sucessfully started, it will trigger AdShowStarted event, if failed then it will trigger AdShowFailed event , if ad is clicked then it will call AdShowClicked event, if ad is completed then it will trigger AdShowCompleted method and if ad is skipped then it will trigger AdShowSkipped event.


Banner Ad
You should first load banner ad using LoadBannerAd method which need params adUnitId & size. You can give a custom size, dynamic size or normal size(320*50) in size param. After banner is loaded, it will trigger BannerLoaded event with adUnitId. If failed then it will trigger BannerFailedToLoad event. To show banner ad, you should provide a horizontal arrangement on which banner ad can lie with ShowBannerAd method.

Downloads :

Download Latest Version Of Extension From Github

This extension is open-source at


Bug "Server error: could not build target. Please try again later!"

1 Like

This is not due to the extension. See here :

1 Like

Thank you! It works OK on the server http://code.appinventor.mit.edu.


Please tell how to get library

1 Like

If you mean extension then you will find the download link in the first post(documentation). The extension is also open-source at github.

1 Like

No I mean how did I get the libs to compile the extension

1 Like

Maven Repository: com.unity3d.ads » unity-ads (mvnrepository.com)

Or you can also download the libraries from here :
UnityAdExtension/deps at main · oseamiya/UnityAdExtension (github.com)


Hello please provide your email I want to contact you personally.

1 Like

We advise against sharing personal info. You can just send a pm.


Hello sir is this extension with latest sdk i.e 4.1.0?

1 Like

And please tell where I am wrong.

This is what library I put :

These are the libraries I am using:

But on compiling this error appears :

1 Like

This extension uses the latest SDK which I have already mentioned in the first post/documentation.

You may have to show the full code.

Btw why do you need to build an extension by yourself, if it is already built and available :expressionless:


I really think that you have done a great job by building the extension. I just want to learn how to compile myself thats why I asked. Can you tell me step by step? I make websites and applications you can call be a developer if you may. Making extensions is something I am not know with so I want to increase my knowledge to making extensions. I am 17 years old by the way so its a great time for me to learn these thing which will help me in future


interstitial is not showing ads, only in test mode. The ads closes at the same time it opens.

Can you show the blocks or anything to prove it ?

Captura de tela de 2022-06-25 13-50-25

Banner is working fine, btw

Its because you are trying to show the ad without being loaded completely...

You can use something like this :

When Button1.Click
     Load Interstitial Ad

When Interstitial Ad.Loaded
    Show Interstitial Ad

Or there are many logics you can use.... Just make sure you show the ad after AdLoaded event is triggered.

1 Like

I'm still getting the same error
Captura de tela de 2022-06-25 21-34-31
I will not use interstitial in my app, only the banner, but i hope you can fix this. Great extension, btw


I used these blocks,

And this is working for me,

I don't have my laptop to check more... Add game id, enable testmode to true and give a try.