- Home /
Unity Ads Placeholder Problem
So I implemented the Unity Ads System in my game.
The Banner works very well.
But there is a problem with the rewarded video ads and the interstitial ads.
When the scene starts, Advertisements Script creates a Placeholder Object which contains the dummy ads.
But It creates the object in runtime.
So when I start the game, I initialize the ads with my gameId and the placeholder object is created.
Then the scene changes to Gun Selection Screen, where if the player doesn't have enough money he can watch the rewarded video and get money.
But the problem is that the placeholder object gets destroyed when I change to the scene.
And the Advertisement Script needs to access the Placeholder object to show the ads.
So it gives me a MissingReference Exception.
Also, when I directly play the gun selection scene, the placeholder is created in that scene and I can get the rewarded video.
I have tried all the possible solutions for creating an Admanager object and keeping in DontDestroyOnLoad.
But It doesn't work.
I think someone may find the solution to this problem.
I have the same problem. Did you find a solution for this? @rischie26
Answer by nunorbrito18 · Jan 05, 2020 at 03:07 PM
Window -> Package Manager -> Advertisement to 3.4.1 seems to fix it
Answer by wrmmrw · Feb 04, 2021 at 09:38 AM
Remove the listener from the old scene when you change or reload the scene Advertisement.RemoveListener(this);