DrMoriarty / godot-applovin-max

AppLovinMax plugin for godot engine.
27 stars 7 forks source link

hide and remove banner in global ads manager iOS #10

Open AbdulkarimAhmad opened 3 years ago

AbdulkarimAhmad commented 3 years ago

am using this

func _ready():
    if CheckIfExist(): # chech if save game exist
        LoadGame()
    root = get_tree().get_root() # get the root of the application 
    progressBar = get_node("CanvasLayer/TextureProgress")
    get_node("CanvasLayer/TextureRect").visible = false
    progressBar.visible = false

func loadBanner() :
    applovin_max.loadBanner("449d3e1f299a6c41",false ,self.get_instance_id())

func loadInetr() :
    applovin_max.loadInterstitial("c2388c98f3bad91f", self.get_instance_id())

func removeBanner() :
     applovin_max.removeBanner("449d3e1f299a6c41") 

func _on_banner_shown(id: String):
    yield(get_tree().create_timer(10),"timeout")
    applovin_max.removeBanner(id) 

func _on_banner_loaded(id: String):
    applovin_max.showBanner(id)

func _on_interstitial_loaded(id: String) :
    applovin_max.showInterstitial(id)

func _on_interstitial_failed_to_load(id: String, error: String):
    get_tree().paused = false

func _on_interstitial_close(id: String) :
    get_tree().paused = false

the problem is whenever I try to remove the banner its not work I tried to useremoveBanner() and hideBanner()in every scene I try to make it wait 10s after show and then remove it and hide it and it still appear I try to use applovin_max.removeBanner(id) and applovin_max.hideBanner(id) in specific scene but still appear

Muserato commented 2 years ago

I am having the same issue. I can create the banner, but can't destroy it. Hiding the banner works for me, but it reappears when a new banner ad is loaded, which is rather annoying. The following error appears in the Xcode output when trying to remove the banner.

SCRIPT ERROR: Invalid call. Nonexistent function 'removeBanner' in base 'Reference (applovinmax.gdns)'. at: removeBanner (res://scripts/applovin_max.gdc:149) - Invalid call. Nonexistent function 'removeBanner' in base 'Reference (applovinmax.gdns)'.