Help us understand the problem. What is going on with this article?

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

はじめに

ゲーム開発時に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

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした