Question by
Magnificent_7 · Oct 21, 2019 at 01:24 PM ·
editor-scriptingjsonpost processingpreprocessor
PostProcessing a Json file at importation
Hell everybody,
I have a bunch of Json to import in purpose to parse them in some ScriptableObjects. Since I am a little bit lazy, I would like to do it with a nice Editor script during AssetPostProcessor (or AssetPreProcessor) instead of doing it by hand. In this purpose, I need to retrieve the name of the imported Json file. Unfortunately, it seems that the assetImporter of the AssetPostProcessor class doesn't allow to retrieve its name.
And, after that, how can I use this Json file to parse it into my ScriptableObject since the "assetImporter" can't be cast as a TextAsset in order to use the Json file.
Is anybody had a solution ?
Regards
PS : excuse my English, I'm desperately French
Comment