Hi, I’m learning unity3D + c #.
I can’t figure out how to make JSON files communicate with ScriptableObjects.
My intent is to use JSON files for localizations in various languages.
Are there tutorials? Or Are there any better methods?
Hi, I’m learning unity3D + c #.
I can’t figure out how to make JSON files communicate with ScriptableObjects.
My intent is to use JSON files for localizations in various languages.
Are there tutorials? Or Are there any better methods?
JSON files are static repositories of data. You use a JSON utility to read/write their data.
ScriptableObjects instances are also static repositories of data. You access them as a class instance reference.
Draw yourself a diagram of what goes from where to where data-wise.
Unity does apparently already have a localization package available in preview form from the Unity package manager. Caveat: I have not used it and you do need to enable preview packages to use it.
The ScriptableObjects, must read the description of the objects from the JSON files.
In such a way, that I can only pass JSON files to my translator and not have the whole Unity project open