Unity Banner ad set fixed width

703 views
Skip to first unread message

aspirino67

unread,
Jul 1, 2017, 2:23:34 PM7/1/17
to Google Mobile Ads SDK Developers
Hi! I have successfully integrated Google Mobile Ads to my Unity app, and I am seeing the banner on my phone. However, I need the banner width to be limited to the middle third of the screen width, because the other two thirds are reserved for UI controls.
I understand you can do this if you are using Android Studio because you can change the layout files. Is there a way of setting this custom width from a C# script in Unity? Right now I am using AdSize.SmartBanner
Thanks!

Joshua Lagonera (Mobile Ads SDK Team)

unread,
Jul 3, 2017, 1:42:11 AM7/3/17
to Google Mobile Ads SDK Developers
Hi there,

Yes, it is possible to set a custom Ad Size for Banner Ads. You can see how it is done from our official Unity guide. You can also customize the Banner Ad's position.

Let me know if this works for you.

Regards,
Joshua Lagonera
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages