# Am I able to code my own extensions?

**URL:** <https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721>\
**Category:** Questions\
**Created:** [August 24, 2016, 9:38am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721 "2016-08-24T09:38:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![HexDump](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@HexDump](https://forum.defold.com/u/HexDump)\
**Post date:** [August 24, 2016, 9:38am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/1 "2016-08-24T09:38:19Z")

</div>

Hi,

Some months ago I left defold behind because it did not support custom extensions. Now I see this : [Defold plugins, extensions and useful code snippets](https://forum.defold.com/t/defold-plugins-extensions-and-useful-code-snippets/2102) and brough some hope.

All my games come with UnityAds, Admob and Facebook Audicence ads, so, I really need to integrate them. Is this possible at the moment?

If it is not possible, when will it be? I see posts from May and Jun suggesting you are heavily working on this feature so, could you give us an estimate date?.

Cheers.

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [August 24, 2016, 10:30am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/2 "2016-08-24T10:30:52Z")

</div>

Hey! The ads can be displayed on the WebView context. There was a demo projects on the forum.  
The C++ option for Defold is coming indeed. We expect first alpha testers to get something within a month. We had a proof of concept working in early June. But then vacations happened =]

People relying on third party SDKs now develop their projects with Defold considering we’re releasing the C++ plugins option this autumn.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 24, 2016, 10:40am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/3 "2016-08-24T10:40:27Z")

</div>

Can you use UnityAds outside the scope of a Unity game?

---

<div class="post-metadata">

**Author:** ![HexDump](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@HexDump](https://forum.defold.com/u/HexDump)\
**Post date:** [August 24, 2016, 11:16am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/4 "2016-08-24T11:16:46Z")

</div>

Yes, of course. As an example: [GitHub - Unity-Technologies/unity-ads-android: Unity Ads SDK for Android · GitHub](https://github.com/Unity-Technologies/unity-ads-android/wiki/sdk_android_integration_guide)

---

<div class="post-metadata">

**Author:** ![HexDump](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@HexDump](https://forum.defold.com/u/HexDump)\
**Post date:** [August 24, 2016, 11:44am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/5 "2016-08-24T11:44:26Z")

</div>

I think I will wait for this thing to appear :). Then I will decide. I know you have a lot of things to do, but for mobile, native extension should have been first citizen in engine IMO.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 24, 2016, 11:47am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/6 "2016-08-24T11:47:28Z")

</div>

I see, thanks! Many ad providers do unfortunately not provide support for HTML5/Javascript which would be required to show ads using the Defold WebView. Unity Ads does not have a Javascript SDK and it seems like AdMob discontinued theirs a while after Google acquired them (and now recommend to use AdSense instead).

Facebook Audience ads looks doable though. I’ll see if I can get it working.

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [August 24, 2016, 12:26pm UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/7 "2016-08-24T12:26:05Z")

</div>

We can have a nice conversation about priorities in the engine here =] But we’ll be happy to see you happy with Defold as we have features you need.

---

<div class="post-metadata">

**Author:** ![HexDump](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/h/7ea924/32.png) [@HexDump](https://forum.defold.com/u/HexDump)\
**Post date:** [August 24, 2016, 1:45pm UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/8 "2016-08-24T13:45:04Z")

</div>

My logic is that if you have support for extensions from the beginnign you will remove a bit of the burden to develop a lot of things people ask like: different ad networks, steam support, etc… etc…

Then, the mytical sentence “Do it yourself and contribute” can be answered in a lot of different threads :D.

Cheers,

---

<div class="post-metadata">

**Author:** ![KitStainedHeart](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/kitstainedheart/32/1678_2.png) [@KitStainedHeart](https://forum.defold.com/u/KitStainedHeart)\
**Post date:** [August 24, 2016, 3:33pm UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/9 "2016-08-24T15:33:11Z")

</div>

hey @Oleg_The_Evangelist, about the alpha testers, will we need to apply to something somewhere, or can i like, just download the alpha version and play with it? \>w\< i am really interested and I want to try this out as soon as possible~

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 25, 2016, 7:46am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/10 "2016-08-25T07:46:44Z")

</div>

> [@britzl](#):
>
> Facebook Audience ads looks doable though. I’ll see if I can get it working.

I almost have it working. Facebook Audience-Network ads is a bit tricky since you cannot serve them from file:// so I had to re-use an web server implementation I wrote a while back to serve the actual HTML (built on top of LuaSocket). With the webserver in place all of the JS is loading as it should but I always get “Audience Network error (1001) No fill. We are not able to serve ads to this person”. If I browse to the webserver from a desktop browser in device mode or from another mobile phone the page loads as expected and Facebook Audience-Network ads are served. I need to sit down with @Mathias_Westerdahl once he is back from vacation and look at out WebView implementation. It could be that it is too restrictive in some way.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [August 25, 2016, 8:24am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/11 "2016-08-25T08:24:13Z")

</div>

Did you have a native Facebook app installed and logged in while testing?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 25, 2016, 8:55am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/12 "2016-08-25T08:55:25Z")

</div>

Yes, I checked all of the obvious things stated in the [troubleshooting FAQ](https://developers.facebook.com/docs/audience-network/faq#faq_1204719862895859) and the more detailed list in the [Error Codes section](https://developers.facebook.com/docs/audience-network/testing#errors).

My guess is that the webview is configured in a very restrictive way which prevents the FB script to check if the user is signed in on Facebook for instance. I haven’t tried on iOS yet. I might have more luck there.

---

<div class="post-metadata">

**Author:** ![JCash](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jcash/32/57_2.png) [@JCash](https://forum.defold.com/u/JCash)\
**Post date:** [August 25, 2016, 11:43am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/13 "2016-08-25T11:43:07Z")

</div>

I don’t recall setting the android WebView in any special restrictive mode (like disabling anything), and I don’t see anything in particular that stands out in the code. Perhaps it is something that needs to be enabled to work. I would try this on iOS to see if this is platform specific.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 25, 2016, 1:12pm UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/14 "2016-08-25T13:12:59Z")

</div>

Yup, I’m working from home today and tomorrow but I think I have an iOS device lying around somewhere so that I can give it a try.

---

<div class="post-metadata">

**Author:** ![Oleg\_The\_Evangelist](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/oleg_the_evangelist/32/1596_2.png) [@Oleg\_The\_Evangelist](https://forum.defold.com/u/Oleg_The_Evangelist)\
**Post date:** [September 1, 2016, 9:38am UTC](https://forum.defold.com/t/am-i-able-to-code-my-own-extensions/2721/15 "2016-09-01T09:38:02Z")

</div>

We’ll do a call here on forums and on the slack #social channel. So please stay tuned. We’re working hard to get something out for you guys.
