コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Google AdMob にテストデバイスを追加する時は SystemInfo.deviceUniqueIdentifier が使える

概要

Google AdMob の公式ドキュメントには
テストデバイスを追加する時はコンソールや logcat 出力で
テストデバイスの ID をコピーして使用する、と記載されていますが

var request new AdRequest.Builder()
       .AddTestDevice( SystemInfo.deviceUniqueIdentifier )
       .Build();

SystemInfo.deviceUniqueIdentifier を使うと
コンソールや logcat 出力を確認する手間を省略できます