「Unity/Csharp/広告」の版間の差分
ナビゲーションに移動
検索に移動
編集の要約なし |
編集の要約なし |
||
| 16行目: | 16行目: | ||
参考:https://www.siteengine.co.jp/blog/advertising-id/ | 参考:https://www.siteengine.co.jp/blog/advertising-id/ | ||
==IDFA取得== | |||
SKAdNetworkを入れなければならない。 | |||
[[Unity/GoogleMobileAds/SKAdNetwork]] [ショートカット] | |||
2023年5月18日 (木) 15:52時点における版
広告ID
- Androidは、Google Advertising ID(AAID)
- iOSは、Identifier For Advertising (IDFA)
Application.RequestAdvertisingIdentifierAsync(
(string advertisingId, bool trackingEnabled, string error) =>
{
Debug.Log("advertisingId=" + advertisingId + " enabled=" + trackingEnabled + " error=" + error);
}
);
iOS例(アプリidが違っても同じ文字列。変更したい場合は、端末側で設定/プライバシー/広告idをリセットすれば良い)
advertisingId=94B629DE-F122-4CB0-B3B5-A8C7DE5D74E0 enabled=False error=
公式:https://docs.unity3d.com/ScriptReference/Application.RequestAdvertisingIdentifierAsync.html
参考:https://www.siteengine.co.jp/blog/advertising-id/
IDFA取得
SKAdNetworkを入れなければならない。
Unity/GoogleMobileAds/SKAdNetwork [ショートカット]