- Home /
Saving and Re-calling Remove Ads Functionality *Newbie!*
Hi there!
I've made a "Remove Ads" purchase option in my game and am trying to implement it.
Currently, in my IAP Manager script I save a variable to PlayerPrefs when you click and complete purchase on the Remove Ads Button
// After purchase is completed
var adFree = 1;
PlayerPrefs.SetInt("AdFree", adFree);
I then want to call adFree in a different script to see if it's been purchased before playing ads.
I have two main questions.
Should I be setting the default (i.e. adFree = 0) somewhere?
When I try and call adFree (using this method:
https://forum.unity.com/threads/playerprefs-setbool-and-playerprefs-getbool.12795/) in my Ad Manager script I get errors.
I apologize if this is a dumb question! I'm new to Unity and coding. Any clarification or tips would be very helpful!
I personally feel like newbies shouldn't worry about ads, that's like a medical student wanting to be paid as a doctor while still in school.. I used unity for 5 years before working on a game to monetize, it really cheapens the market when newbies are releasing on stores imo, not trying to be rude. If you want to make money then you should make a really good game, also putting out beginner games to the public will give you a bad image.
Thanks for the response. Sorry if i’m mistaken, should I be posting this query somewhere else for coding help?
Your answer
![](https://koobas.hobune.stream/wayback/20220612235418im_/https://answers.unity.com/themes/thub/images/avi.jpg)