Unity : Netcode for GameObjects をアップデートしたらエラーだらけに。。。

Unity

preから1.0.0に更新してみたら
com.community.netcode.extensionsでエラーになり。NetworkDictionaryなんとかなので
とりあえず 1.0.0-pre.8で動くことは動くけど。。。

入れる順。

com.unity.netcode.gameobjects@1.0.0-pre.8

com.unity.netcode.adapter.utp ( pre.6 )

https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/com.community.netcode.extensions

と3つ入れると一応動く。。。

utpのは6 -> 4に勝手に変更されるし。GUIDのエラーは消えない。

どこかのタイミングでプロジェクト作り直して綺麗にしないと。。。


メモようです。

適当に更新しても全く解決せず。。。

The type or namespace name ‘UnityTransport’ could not be found (are you missing a using directive or an assembly reference?)

com.unity.netcode.adapter.utp

Unity Transport for Netcode for GameObjectsを削除してみた。

Netcode for Gameobjectsをremoveしてインストールし直してみた。

GUID [6960e84d07fb87f47956e7a81d71c4e6] for asset ‘Packages/com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs’ conflicts with:
‘Packages/com.unity.netcode.adapter.utp/Runtime/UnityTransport.cs’ (current owner)
We can’t assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

競合しているそうでよくわからないので・・・
(単純に消して大丈夫でした。

unityのプロジェクトにある Libraryを消してパッケージを再インポートしてみた。

これはwarining

A meta data file (.meta) exists but its folder ‘Packages/com.community.netcode.extensions/Editor/MLAPI Patcher’ can’t be found, and has been created. Empty directories cannot be stored in version control, so it’s assumed that the meta data file is for an empty directory in version control. When moving or deleting folders outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it.

これは error

GUID [6960e84d07fb87f47956e7a81d71c4e6] for asset ‘Packages/com.unity.netcode.adapter.utp/Runtime/UnityTransport.cs.meta’ conflicts with:
‘Packages/com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs.meta’
We can’t assign a new GUID because the asset is in an immutable folder. The asset will be ignored.

・・・よくわかりません。

https://github.com/Unity-Technologies/multiplayer-community-contributions?path=/com.community.netcode.extensions

これは解消できないのですが、とりあえず。。。動かせます。。

とりあえず、2つ同じファイルがあるということですね

com.unity.netcode.adapter.utp/Runtime/UnityTransport.cs.meta
を削除すると大丈夫そうでした。

UnityTransport.csとmetaを削除しました。

com.community.netcode.extensionsが参照で

{
  "name": "com.community.netcode.extensions",
  "displayName": "Netcode for GameObjects Community Extensions Package",
  "version": "1.0.1",
  "unity": "2019.4",
  "description": "The Netcode for GameObjects Community Extensions package is a package containing extensions to Netcode for GameObjects.",
  "author": "",
  "dependencies": {
    "com.unity.netcode.gameobjects": "1.0.0-pre.4",
    "com.unity.netcode.adapter.utp" : "1.0.0-pre.4"
  }
}

こんな感じになっているので com.unity.netcode.adapter.utpいらないかな?と思うのですがよくわかりません。

com.unity.netcode.gameobjects 1.0.0 – pre.8までしか com.community.netcode.extensionsがコンパイル通らないので・・・ここは諦め

まあローカル接続いらないと言われればそれまでなのですが。。。

この辺かな

fix: port NetworkDictionary to 1.0.0 (stable) by WhippetsAintDogs · Pull Request #178 · Unity-Technologies/multiplayer-community-contributions
internal static void Write and internal static void Read methods of the public static class NetworkVariableSerialization (NetworkVariableSerialization.cs) of th...

お気軽にコメントください!

スパム対応のためコメント認証に数日かかることがありますが、お気軽にコメントいただけると嬉しいです^^

コメント

タイトルとURLをコピーしました