はじめに
ゲーム開発時にUnity NetCodeをInstallして、「さて、ゲームを作ろう」という時に、いきなりエラーが出てしまいます。
本記事ではそのエラーを解決する方法を書きました。
環境
- Unity 2019.3.0f6
- Unity NetCode preview.0 - 0.0.4
問題
Package ManagerからUnity NetCodeをInstallすると次のようなエラーが出ます。
Library/PackageCache/com.unity.netcode@0.0.4-preview.0/Runtime/ClientServerWorld/ClientServerBootstrap.cs(31,33): error CS1503: Argument 1: cannot convert from 'System.Collections.Generic.IReadOnlyList<System.Type>' to 'System.Collections.Generic.List<System.Type>'
解決法
ClientServerBootstrap.cs
の31行目
GenerateSystemLists(systems);
を次のように変更します。
GenerateSystemLists(systems as List<Type>);