Quantcast
Viewing all articles
Browse latest Browse all 1416

Unity ads problem

When i run the code it reach it limit, it show the ad but after that it show ads after every restart of the scene. { int counter = 4 ; public int Counter { get { return counter; } set { counter = value; } } void Awake() { if (Counter>2) DontDestroyOnLoad(this); } void OnLevelWasLoaded(int level) { if (level == 1) { if (Counter == 2) { Counter = 5; Advertisement.Show(); } else { Counter--; } Debug.Log(Counter); } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>