I used the type "JSONObject" type a project and now when i create a new project in unity and try to use it, compiler says: "The type or namespace name `JSONObject' could not be found. Are you missing an assembly reference?"
Asked
Active
Viewed 474 times
1
-
1You need to download the JSONObject class from [this](http://wiki.unity3d.com/index.php?title=JSONObject) site. If you have already done this, you have to include the namespace.Make sure that the JSONObject class is in the Asset folder. Although, Unity's JsonUtility can be used to read json data. There are just few instances when JSONObject is needed over JsonUtility. – Programmer Aug 19 '17 at 09:52
-
@Programmer My case is one of those few cases. what namespace should I include? – Orilious Aug 19 '17 at 10:12
-
Actually I checked again and it doesn't look like it has a namespace. Just put the file in the Assets folder. If you still have problems even after doing it then you have a create a new folder, import the JSONObject.cs file there then create a simple test script to use. Also, edit and post that test script that does not recognize JSONObject in your question. – Programmer Aug 19 '17 at 10:18