Load JSON Scriptable Object and Prefabs
Hello! I am using the Built-In unity JSON parser (to save and load).
The data is created correctly for everything except prefabs and scriptable objects. The JSON file seems to save the objects via their InstanceID. When the Unity project is then closed, saved, moved onto another computer, and reopened (the same project) then the InstanceIDs are changing (sometimes) and the JSON loader just loads null.
I am at a loss as to how to solve this problem, any help would be greatly appreciated.
Thank you for your time!
Answer by Ruffian0305 · Oct 09, 2018 at 03:48 AM
Solution: When using JSONUtility in Editor code, you EditorJSONUtility instead of JSONUtility. This is causing another problem though when trying to actually use the JSON in game
Your answer
Follow this Question
Related Questions
Custom inspector - How to serialize scene objects in ScriptableObject? 0 Answers
Why "the associated script can not be loaded" for some Scriptable Objects? 1 Answer
Abillity system for turn based strategy 0 Answers
type mismatch on texture 2D inside scriptable object 0 Answers
I need a clean way to “cast” cards in a card game in Unity? 0 Answers