Unity Ads

Help, support and information for our Game Framework Unity Asset.
If posting about the assets in the extras bundle then please use the appropriate forum.
Post Reply
bradjensen68
Posts: 63
Joined: Thu Dec 08, 2016 7:34 pm

Unity Ads

Post by bradjensen68 » Mon Jan 07, 2019 2:42 pm

Hello! OK, so I am trying to add Unity Ads to my game. I have never doen this before, so I don't know if I this is just a simple question or not. I added a button with OnButtonClickWatchAdvertForCoins and the ShowAdvert on another page. I have installed the latest Unity Monitization System, set up an account, and enabled it. Now, no matter what I do, I still cannot test the button in editor. I just get a pop-up saying that I have not enabled Unity Ads. Do I have to test it in a build or how else can I see if it is working or not?

mahewitt
Site Admin
Posts: 235
Joined: Thu May 05, 2016 8:06 pm

Re: Unity Ads

Post by mahewitt » Thu Jan 17, 2019 6:33 pm

Hi. I have seen this problem before, but not really identified a good fix. When you enable Unity ads it should also enable some #defines that GameFramework uses to include the correct code. For some reason this isn't always picked up. I have seen various combinations of restarts has worked before. As a quick fix you could always remove the #ifdef & #endif lines from teh OnButtonClickWatchAdvertForCoins script.

Let me know if either of the above helps.

bradjensen68
Posts: 63
Joined: Thu Dec 08, 2016 7:34 pm

Re: Unity Ads

Post by bradjensen68 » Tue Jan 29, 2019 10:03 pm

Not sure if I am doing it correctly, but I am still seeing the same error.

bradjensen68
Posts: 63
Joined: Thu Dec 08, 2016 7:34 pm

Re: Unity Ads

Post by bradjensen68 » Thu Jan 31, 2019 4:56 pm

New Error:

Assets/FlipWebApps/GameFramework/Scripts/Advertising/UnityAds/UnityAds.cs(64,35): error CS0433: The imported type `UnityEngine.Advertisements.ShowResult' is defined multiple times

Assets/FlipWebApps/GameFramework/Scripts/Advertising/UnityAds/UnityAds.cs(57,46): error CS0433: The imported type `UnityEngine.Advertisements.ShowOptions' is defined multiple time

Assets/FlipWebApps/GameFramework/Scripts/Advertising/UnityAds/UnityAds.cs(55,17): error CS0433: The imported type `UnityEngine.Advertisements.Advertisement' is defined multiple times

bradjensen68
Posts: 63
Joined: Thu Dec 08, 2016 7:34 pm

Re: Unity Ads

Post by bradjensen68 » Thu Jan 31, 2019 9:32 pm

I should also mention that I am using the Unity Monetization 3.0 since Unity Ads has been deprecated.

mahewitt
Site Admin
Posts: 235
Joined: Thu May 05, 2016 8:06 pm

Re: Unity Ads

Post by mahewitt » Tue Feb 05, 2019 9:13 am

Hi,

I will have to look into this. The ads part has fallena bit behind and so will need some updates to work with the Monitization stuff. Still a bit puzzled as to why those errors would show up. Have you enabled both monetization and Ads?

Mark

Post Reply