- Home /
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);
}
}
Comment
Your answer
Follow this Question
Related Questions
Mobile Ads Frameworks that support unity 0 Answers
Admob Memory Issues 0 Answers
Unity3d banner ads 1 Answer
Unity Admob Implementing Interstitial 1 Answer
Interstitial pause game on Android but not on iOS? 5 Answers