Problem with JSON parser working globally.
Opened this issue · 4 comments
Spine runtime's JSON parser is trying to import the JSON's generated by Dialogic such as Characters. Is there a way to prevent spine-runtime from thinking every JSON file in the project is a spine skeleton data JSON?
It should be able to change the import option of a JSON file in the Import panel.
Played around a bit but changing import options for Dialogic related files didn't help. Dialogic just creates JSON files, and spine-runtime tries to import them as spine related JSON files.
These ".import" files shouldn't exist at all when using dialogic. I believe they are created or caused by spine-runtime.
I think a good way to handle this issue is to change the code of spine-runtime to make it look for a specific location in the project to find and import spine atlas and JSON files. For example, it should only do the import operation inside "spine-assets" folder. Or maybe a way to exclude folders, I don't know. I tried to change some code in Json and EditorPlugin files in the repo but to be honest it's way over my head.
I think there may be a option of not importing the JSON file in the Import Panel. Have you tried that?
.json files will not been imported in Godot newest versions. They have a note in Spine-Godot docs explaining this:
Note: You should prefer binary skeleton exports over JSON exports, as they are smaller in size and faster to load. If you must use JSON, make sure the file extension is .spine-json instead of .json. If you have an existing project that still uses .json export files, you can use this Python script to convert it to the new .spine-json extension.
Check it out HERE