LoginSignup
0
0

More than 3 years have passed since last update.

Unity2020(2020.1.2.f1)で発生するJSON parse errorについて

Posted at

概要

Unityで新規に作成したプロジェクト内で、以下のようなエラーが出ることがないでしょうか。

Error detecting Visual Studio installations: System.ArgumentException: JSON parse error: Invalid escape character in string.

対処法

プロジェクト内にあるPackagesの中にあるDiscovery.csを変更する必要があります。
私のバージョンの場合は
「Library\PackageCache\com.unity.ide.visualstudio@2.0.2\Editor」という配下に有りました。

変更する内容は
IEnumerableクラス内にあります、以下のように変更します。

var process = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName = progpath,
                    /*
                     * 変更前
                     * Arguments = "-prerelease -format json",
                     */
                    Arguments = "-prerelease -format json -utf8",
                    UseShellExecute = false,
                    CreateNoWindow = true,
                    RedirectStandardOutput = true,
                    RedirectStandardError = true,
                }
            };

変更後は再起動をする必要があります。
また、新規で別のプロジェクトを作成するたびに出てきてしまうため、その都度対処が必要になります。

参考URL

0
0
1

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
0
0