2
1

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 5 years have passed since last update.

Monobit Unity Networking 2.4.1.1 を導入して Windowsビルドしようとしたらエラーが発生した時の話

2
Last updated at Posted at 2018-08-29

前提

現在の状態

  1. 自前のUnityプロジェクト作成済み
  2. MUN のプロジェクトへの導入も終わっている

Windowsビルドして動作確認しようとしたらエラーがでる

MUN ver.2.4.1.1導入前は普通にビルドできてたのに、導入後からビルドできなくなった。

ビルド時に発生したエラー

Plugin 'mrs.dll' is used from several locations:
 Assets/Plugins/x86_64/mrs.dll would be copied to <PluginPath>/mrs.dll
 Assets/Plugins/x86/mrs.dll would be copied to <PluginPath>/mrs.dll
Please fix plugin settings and try again.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

原因

Windowsビルドの場合、下記の複数の場所にmrs.dllがあり、
どちらも有効なのでどっち使っていいかわからない状態のようだ。

Assets/Plugins/x86/mrs.dll
Assets/Plugins/x86_64/mrs.dll

解決方法

それぞれ32bit・64bitのビルド時に使い分ける必要があるようなので、
それぞれの環境でのみ有効になるよう設定を変更する。

  1. Project ウィンドウから Assets/Plugins/x86_64/mrs.dll を選択
  2. Inspector ウィンドウの Platform settings にて [↓]アイコンのタブを選択
  3. x86のチェックをOff x86_x64のチェックをOn にした状態にしてApply
  4. Project ウィンドウから Assets/Plugins/x86/mrs.dll を選択
  5. Inspector ウィンドウの Platform settings にて [↓]アイコンのタブを選択
  6. x86のチェックをOn x86_x64のチェックをOff にした状態にしてApply

以上

参考

↓の導入用ドキュメントに書いてある事を導入時点で全部やってればそもそも発生しないエラーだったようだ。

■ MUNクライアントのセットアップ
> プラグインのターゲットプラットフォーム設定
http://www.monobitengine.com/doc/mun/

↓しかも ver 2.5.0ではデフォで解決してくれていたようです。

MUN/MRSライブラリについて、すべての UnityEditor のバージョンでターゲットプラットフォームを自動的に割り当てられるように改善いたしました。
http://www.monobitengine.com/info/973/

解決して書き終わってから、公式みたら終わってた事に気づくパターンの奴。。

2
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?