Hi everyone,
I stored my game’s skill data in a script component like this, now I feel it’s hard to view and manage. Is it possible that I export the data to json or something and import again?
Thank you!
You can use JsonUtility.ToJson to turn any MonoBehaviour or ScriptableObject into Json and then JsonUtility.FromJsonOverwrite to apply that Json back to the object.
In editor code, you’ll want to use Undo.RecordObject (or EditorUtility.SetDirty) to make sure changes are properly saved after loading a Json.
1 Like