1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Assenbly Definition Referencesを利用した状態でAddressableビルドをした際にUnityEditor云々と怒られた際の対処方法

Posted at

概要

UnityEditorの拡張機能を作成した状態でAddressableのビルドをしようとしたらエラーが出ました。
その時の対応の内容です。

事象

Addressableのビルドをしようとしたら以下のエラーが発生。

image.png

error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)

image.png

画像にある「Assets/Plugins/Commons/Editgor/ToggleImageEditor」というのがエディタ拡張で作成してみたクラス。
それを読みにいってる。

原因と解決

ビルド効率化のためにAssenbly Definition Referencesを使ってるんだけど、そこでEditorのビルドプラットフォームにAndroid / iOSが入ってたのが原因っぽい。
どうも、Addressableのビルドする際には対象のプラットフォームでビルドするみたいですね。
ということで、PlatformsからAndroid / iOSを外したらビルドできるようになった。

image.png

多分、 Linux 64-bit以降のも全部外した方がよさそう。
というかEditorだけにしていいんじゃないかなとは思う。まぁ、実害が出るまでは放置。

1
0
1

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?