DrMoriarty / godot-applovin-max

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

callback id #6

Closed AbdulkarimAhmad closed 3 years ago

AbdulkarimAhmad commented 3 years ago

Hi there am trying to implement the plugin in my app and i have a question what is the callback id

thanks

DrMoriarty commented 3 years ago

callback id is ad identifier of your object which should get be called. Use it like this: applovin_max.loadBanner("zone_id", true, get_instance_id())

AbdulkarimAhmad commented 3 years ago

am sorry am kind of new at Godot why should i use it that way thanks

DrMoriarty commented 3 years ago

in gd-script you can not provide callback as you can do it in javascript, or swift, or kotlin (or other modern languages) so native library should know the instance of your object and the name of the function which it should call. The function names described in README also their input parameters. The last thing is your object instance. In godot every instance of all objects has unique internal number. So when you call the method with get_instance_id() as a parameter, you provide the unique id of caller object. Or you can make callback functions in other listener object. So you should call the method with listener.get_instance_id()

AbdulkarimAhmad commented 3 years ago

thank u a lot last question if u please

i followed applovin max steps for add it to my project but in step 4

"Enable Custom Build and check Plugins/App Lovin Max for using in Android." its not appear neither in the plugins window or in the export window am i missing things ? and if i rrun the game and no ads appear

DrMoriarty commented 3 years ago

check if you enabled android platform in NativeLib view (in the top there are check boxes for every supported platform) after enabling the platform you need to reinstall the plugin. In plugin view there are white icons which shows you available platforms and green icons which shows you installed platforms) after that you should see the plugin in your export view (and enable it there)

AbdulkarimAhmad commented 3 years ago

incredible , thanks a lot every thing as u said its now appear in the export page