JSON Extensions
Kassets instances that is derived from IVariable
can be serialized to JSON format.
An extension method ToJsonString
and FromJsonString
is provided to serialize the instance to JSON format.
You can also handle conversion of the JSON file from the inspector. The following settings can be customized.
Json File Path
: The path where the JSON file will be saved.Data Path
: Points toApplication.dataPath
folder.Persistent Data Path
: Points toApplication.persistentDataPath
folder.Custom Path
: Custom path where the JSON file will be saved.
File Name
: The name of the JSON file.Default
: If checked, the file name will be the same as the instance name.
Save to Json
: Button to save the instance to the JSON file specified by settings above.Load from Json
: Button to load the instance from the JSON file specified by settings above.