- Home /
Question by
tacticalreindeer · Aug 20, 2020 at 09:59 PM ·
unityeditorvisual studioinstallation
Error detecting Visual Studio installations: System.ArgumentException: JSON parse error: Invalid escape character in string.
tried reinstall editor vs and unity hub, cant even open a script please someone help
Comment
Answer by Thunderkilll · Oct 05, 2020 at 01:25 PM
public class JsonHelper
{
public static T[] getJsonArray<T>(string json)
{
string newJson = "{ \"array\": " + json + "}";
Wrapper<T> wrapper = JsonUtility.FromJson<Wrapper<T>>(newJson);
return wrapper.array;
}
[System.Serializable]
private class Wrapper<T>
{
public T[] array;
}
}
Use this