title: Unity3D Show add every 5 restarts
body: <p>I'm trying to make it to where when you restart the game it shows an advertisement after 5 times. This is what I have so far. This does not work. This was tested.</p>
  
  <pre><code>    private int restartNum {
          get {
              return PlayerPrefs.GetInt ("restartNum");
          }
          set {
              PlayerPrefs.SetInt ("restartNum", value);
          }
      }
  
      public void OnButtonClick(string sceneName)
      {
          restartNum += 1;
          if (restartNum == 5) {// adding this makes it not work
              ShowAd ();// This works by itself
              restartNum = 0;
          }
          SceneManager.LoadScene (sceneName);
      }
  </code></pre>