LoginSignup
1
0

More than 3 years have passed since last update.

Unity NetCode 使用時のエラーの解決法

Last updated at Posted at 2020-02-10

はじめに

ゲーム開発時に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.cs31行目

GenerateSystemLists(systems);

を次のように変更します。

GenerateSystemLists(systems as List<Type>);

参考

Getting started with NetCode Error CS1503 - Unity Forum

1
0
2

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