Home > OS >  How To Make An Ad Removal In a Unity game
How To Make An Ad Removal In a Unity game

Time:10-06

Asking for help with how to make an ad removal service in a mobile game I have searched on youtube and they are nothing on how to make an ad removal.

CodePudding user response:

I gather, that you want it to be a paid service.

First, you would need to create a product in your gpg/appstore consoles. It could be a non-consumable, if you want it to be a one time purchase or a subscription, if you want to give ad free state for a limited time. If you haven't already implemented shop, that should be time to do so. You can find a lot of info on how to do it on the internet.

Then, you would need to write logic that prevents ads from showing ads if user is as free. Simple bool should be enough. Just be sure to store it somewhere (any save system, player prefs for eg.) and enable user an option to restore their purchase in case they reinstall your app or switch devices.

If you want this service to be bought not by real money, but for some sort of currency, you can just skip the part about creating products and implementing shop. All you need to do is to remember, that it's an ad free user and when to revoke their rights if necessary.

That should serve as a good start, comment if you have any questions.

CodePudding user response:

First thing you would do is create a database like firebase then you would have a bool for shouldShowAd and once you have that store it in the database and when you are showing the ad you should wrap it in a if statement for example: [Code][1]

now if you want to make it buyable what you would do it watch a youtube video on how unity handles purchases and once its purchased you would want to store it in a database with the users id, there is a good firebase database tutorial I would suggest: https://www.youtube.com/watch?v=Vdgd9TLczY4 [1]: https://i.stack.imgur.com/rRUEA.png

  • Related