Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How can I control the appearance of unity ads ?

Discussion in 'Unity Ads & User Acquisition' started by boylamn, Oct 18, 2015.

  1. boylamn

    boylamn

    Joined:
    Jan 28, 2015
    Posts:
    19
    Hi, I have added unity ads to my game so they appears when the game is over. It's working fine so every time the player lose, the ads is shown. But I feel that will be a little bit boring for players and I want the ads to be shown when the player loses twice or three, but I don't know how. So I need your help.
     
  2. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    use userprefs to save/update total games played.

    to play every 3 games, something like this... (pseudo code)

    if (gamesplayed % 3 == 0) playad()
     
    rasmus-unity likes this.