Def Video Ads - User question

Hey @AGulev I have been using your plugin without issue for video ads.

But now I am adding banner ads to see if it would be better fit. The issue I am having is the banner will show, but I now get an error:

`ERROR:DEFUNITYADS: UnityADS callback is invalid. Set new callback unsing unityads.setCallback() funciton.`

I set the callback prior to calling initialize().

I get this error after calling unityads.hide_banner()`

and then I call `unityads.show_banner()` shortly there after.

Another question I have is, how do I get the height of the banner to be displayed? I adjusted my game gui for the space said to be used, but the banner is still overlapping my gui. Thanks for any help.

Morelikely it happenes because

unityads.initialize() always replaces the current callback using its second argument:

unityads.set_callback(callback)
unityads.initialize(game_id) -- removes callback

A missing second argument in unityads.initialize() becomes LUA_TNONE, which calls DestroyCallback(). It is fixed in the version below.


I’ just released a new version where unityads.EVENT_LOADED and unityads.EVENT_DID_SHOW returns hight and width in screen space coordinates

2 Likes

Even though I read the forum, it is more convenient when issues related to the extension or the engine itself are reported in the relevant repositories.

If you have any issues with the extension, feel free to use Issues · AGulev/defold-extension-unity-ads · GitHub and report them there. Thank you in advance!

2 Likes

Thank you very much. Going forward, I will report issues accordingly.

2 Likes