Dear all,
I am new to Unity and C# programming. Following some tutorials, this is how I am adding Unity ads. Please guide as I have been told that if internet was not connected at time of game start, this method would never load ads even if it turns on again. Also, I need to know if once an ad is played, do we need to do something to load another for the next time or does it get loaded anyway.
Any help/guidance is appreciated within and beyond scope of this question but please keep it simple to understand for me.
string gameId = "1234567";
string placement = "rewardedVideo";
bool testMode = true;
void Start()
{
Advertisement.AddListener(this);
Advertisement.Initialize(gameId, testMode);
}
public void gameOver() { // called on replay button
Advertisement.Show(placement);
}
public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
{
// some game logic here.
}
I am only putting down the relevant portion from my understanding so I apologize if I missed something.
Also I am unclear about NotAvailable and noFill PlacementStates
↧