With photoshop it works fine. In illustrator, I tried but get error
Tried manually add script but that didn't help either. With Photoshop I didn't have any problems.
Also, I downloaded character sheet on freePik and everything is grouped, and subgrouped and so on. Somewhere I read that it should ungroup for better use. Is that true?
Exporting from Illustrator to Spine 2D
When exporting from Illustrator to Spine, issues can arise if the script is not functioning correctly. It's important to ensure that you are following the instructions for the IllustratorToSpine script, which can be found here. If the script is still not working, you can send a sample file to contact@esotericsoftware.com for further assistance. Regarding the organization of your Illustrator file, ungrouping layers can sometimes help, as complex groupings might interfere with the script's ability to process the file correctly.
Could it be that you saved the web page instead of the script?
Make sure to press this button to correctly download it from here
EsotericSoftware/spine-scriptsblob/master/illustrator/IllustratorToSpine.jsx
As Erika said, the script shown in the error is not part of our code.
As far as I know, Adobe Illustrator can export PSD files as well. If you're able to do that while preserving the layers, you can import it directly into Spine using the Import PSD feature.
True that, script was not properly downloaded. Thank you both for time and answers!
However, Illustrator groups and layers, and sub-layers are so complicated. Photoshop is much easier, in my opinion of course.