unity : googleads-mobile-plugins
https://github.com/googleads/googleads-mobile-plugins
admobをこれで入れてみます。
unity 4.5で動くかな?
https://github.com/googleads/googleads-mobile-plugins/releases
v2.1 GoogleMobileAds.unitypackage
をダウンロードしてimport
* androidmanifestが上書きされるので、他の物を利用している場合は差分を確認
https://github.com/googleads/googleads-mobile-plugins/tree/master/unity
https://developers.google.com/mobile-ads-sdk/docs/#play
./PATH/android-sdk/tools/android
で、google play servicesが入っているか確認
./SDK/extras/google/google_play_services/libproject/
に
google-play-services_lib
があるので、それを、unityの Plugins/Android/以下にコピーする
早速バナーを表示してみる。
https://github.com/googleads/googleads-mobile-plugins/tree/master/unity
テストIDで表示。
AdRequest request = new AdRequest.Builder()
.AddTestDevice("ここにテストデバイスのID")
.Build();
一度アプリを実行して ddmsでログを表示すると
.AddTestDevice("ああああああああ")
というログが表示されるのでデバイスのIDを取得出来ます。