Hi
I’m using vungle to display 2 kind of ads:
-
- one is in my scene menu.lua, its an incentivized publicity that you need to watch til the end to get some coins
-
- the other is in game.lua its an interstitial, it display the publicity after every X minutes.
I put my ads.init() and adEventListerner in main.lua so it is accessible in all scenes.
The issue is, from adEventListerner in main.lua, how can I access variables or objects in other scenes?
I want for example that when you are in the menu.lua, I do my ads.show() and after I want to show a prompt to display the coins you receive after viewing the publicity. While in the game.lua after I do the ads.show and watch the publicity, I don’t want to do nothing after.
So here I am in main.lua trying to acces objects and variables from menu.lua… is there any way I can do this?
Is there a way I can have a unique callback function by scene? one in menu.lua and one in game.lua?
Or maybe there is a better way to handle ads in multiple scene? what do you think?
thanks