What is the best place to call init()?

Dear All, 

I am currently calling Vungle’s init () function in my main.lua and then I call the show () whenever I want to show the ad. I am wondering if this is optimal or should I call init() in the same scene in which I am calling show()?

In case of Admob banner ads I am calling init() and show() both in the main.lua. Is this the best way as well or not?

Thanks

emcube

Hi Emcube, 

You should call init as early as possible in main.lua. When you call this, Vungle will begin caching an ad. By the time you call ads.show, you’ll have the best chance of having one ready to play!

Jordyn

Vungle

Tech Support Engineer

Thanks.

Hi Emcube, 

You should call init as early as possible in main.lua. When you call this, Vungle will begin caching an ad. By the time you call ads.show, you’ll have the best chance of having one ready to play!

Jordyn

Vungle

Tech Support Engineer

Thanks.