Quantcast
Channel: Unity Ads & User Acquisition
Viewing all articles
Browse latest Browse all 6164

Calling Show() without IsReady()

$
0
0
After my game's level complete, I want a skippable video ad to show. I want it to show if it's loaded, but if it's not loaded, I'm ok with it not showing.

Most people do it this way:
Code (csharp):
  1.  
  2.         if (Advertisement.IsReady()){
  3.             Advertisement.Show();
  4.         }
However wouldn't this code, without the "if" statement work just as well?
Code (csharp):
  1.  
  2.             Advertisement.Show();
  3.  
Why bother with the "if" statement at all?

Is Show() effectively the same as...

Calling Show() without IsReady()

Viewing all articles
Browse latest Browse all 6164

Trending Articles