LoginSignup
1
1

More than 5 years have passed since last update.

2017.4.2f2で、AssetStore版のUnityAdsが、ビルドイン版をオフにしても、"defined multiple times"コンパイルエラー

Posted at

AssetStore版のUnity Adsを使おうとすると、こんなコンパイルエラーに遭遇することがあります。

By the way, the compiler shows compile error with the message that is "Assets/Example.cs(8,9): error CS0433: The imported type `UnityEngine.Advertisements.Advertisement' is defined multiple times".

で、これの原因は「Unity EditorビルドインのUnity Ads」と「Asset Storeから入れたUnity Ads」とで衝突を起こしているからです。これを抑制するためには、ビルドインのUnity AdsをオフにしてあげればOKです。

詳細は、Unity Technologies Japanの「Unity Ads導入時に「The imported type `UnityEngine.Advertisements.Advertisement' is defined multiple times」というエラーが表示される」を見てください。

で、普通は↑の通りやればコンパイルエラーは解消するんですが「2017.4.2f2」だとどうやら、ビルドインのUnity Adsをオフにしてもコンパイルエラーのままでダメっぽいです。

自分の手元で最小構成でも再現したし、UnityのIssue Trackerにこんなのがありました。

"THE IMPORTED TYPE `UNITYENGINE.ADVERTISEMENTS.(...)' IS DEFINED MULTIPLE TIMES" FOR ADS SDK ASSET STORE PACKAGE IN 2017.4.2F2

残念ながら、より新しいLTSの2017.4.3f1でも修正されなかったぽいです。

本稿執筆時には、Issueは「Fix in review」ってステータスなので、もうちょい待ちましょうか。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1