We recently launched v3.3.0 of the Google Mobile Ads Unity Plugin with support
for ad position offsets and Unity 5.6 compatibility. The updated v3.3.0 Unity
package is available for download from the Google
Mobile Ads Unity Plugin GitHub repository .
Ad positions offsets
Version 3.3.0 of Google Mobile Ads Unity Plugin adds the ability to specify an x
and y position for both BannerView
and
NativeExpressAdView
objects. To position ad views outside of the
existing AdPosition
values, provide x and y offsets instead of an
AdPosition
when instantiating an ad view, as shown below.
BannerView bannerView = new BannerView(adUnitId, AdSize.SmartBanner, 50, 50);
The code snippet above creates a BannerView
offset from the
top-left corner of the screen by 50 density independent pixels in the x and y
axis. NativeExpressAdView
positions can be offset in the same
manner, as shown below.
NativeExpressAdView nativeExpressAdView = new NativeExpressAdView(
adUnitId, new AdSize(320, 150), 50, 50);
Support for Unity 5.6
Although Unity 5.6 is still in beta, the latest version of the Google Mobile Ads
Unity plugin includes changes to be fully compatible with the upcoming release.
In addition to the new features outlined above, it is recommended to update to
the latest version of the Google Mobile Ads plugin to take advantage of
stability and bug fixes. The source code and a sample app for the plugin are
available in our GitHub repo ,
as
i s
th e
fu ll
changelog
for this release. If you have any questions about Unity integration, you can
reach us on our developer forum .
- Ram Parameswaran , Mobile Ads Developer Relations