Android : Unity 3D - How to run a piece of code only ...% of the time?

on Saturday, October 11, 2014


I'm trying to implement interstitial ads in my android app, but I only want it to show an ad like 1/5 (20%) of the time.


Right now I have it set up that every time when I die, it switches scenes to the MenuScene, and on scene load it shows an ad.


I dont want to irritate my users with ads all the time, so that's why I don't want to show it every time they die (because you die a lot in this game ;p).


Thanks in advance!


0 comments:

Post a Comment