AGulev
AGulev/defold-extension-unity-ads/unityads
Functions and constants for interacting with UnityAds APIs
- GitHub: AGulev/defold-extension-unity-ads — pinned to
4.21.1(released while Defold 1.14.0 was current)- Pick a release from AGulev/defold-extension-unity-ads releases and add its Source code (zip) URL (or a packaged
.zipasset, if the library ships one) togame.projectunder[project]dependencies, then Fetch Libraries in the Defold editor. - Run
bunx @defold-typescript/cli resolveto materialize its types. - Import it under a namespace alias of your choice:
import * as unityads from "unityads"
- Pick a release from AGulev/defold-extension-unity-ads releases and add its Source code (zip) URL (or a packaged
- Asset Portal: defold-extension-unity-ads
Functions
unityads.initialize(game_id: table, callback: function, test_mode: boolean)unityads.request_idfa()unityads.set_callback(callback: function)unityads.set_debug_mode(is_debug: boolean)unityads.get_debug_mode()unityads.is_initialized()unityads.is_supported()unityads.get_version()unityads.show(placement_id: string)unityads.load_banner(placement_id: string)unityads.unload_banner()unityads.show_banner()unityads.hide_banner()unityads.set_banner_position(position: number)
unityads.initialize(game_id: table, callback: function, test_mode: boolean)
Parameters
game_id:tablecallback:functiontest_mode:boolean
unityads.request_idfa()
unityads.set_callback(callback: function)
Parameters
callback:function
unityads.set_debug_mode(is_debug: boolean)
Parameters
is_debug:boolean
unityads.get_debug_mode()
unityads.is_initialized()
unityads.is_supported()
unityads.get_version()
unityads.show(placement_id: string)
Parameters
placement_id:string
unityads.load_banner(placement_id: string)
Parameters
placement_id:string
unityads.unload_banner()
unityads.show_banner()
unityads.hide_banner()
unityads.set_banner_position(position: number)
Parameters
position:number