Search code examples
javascripthtmlunity-game-engineads

It is possible to use javascript to import ads on unity in a way similar to Html?


I would know if it is possible to import banner ads on a unity 2D game inside an UI object using the code that the provider sent to me. I post it below:

<div id="div_id"></div>
   <script type="application/javascript">
    var sas = sas || {};
    sas.cmd = sas.cmd || [];
    sas.cmd.push(
        function () {
            sas.call(
                { siteId: ######, pageId: ######, formatId: ######, tagId: "div_id" },
                { networkId: ####, domain: "//www.#provider#.com" /*, onNoad: function() {} */ }
            );
        }
    );
    </script>

Thanks in advance!


Solution

  • I think this unity asset may help you: Embedded Browser

    In general, there is no easy way to achieve it unless you use the plugin.