.Winning.

Hello, We are having a problem.

We are upgrading the unity version to 2019 for our project.

And our project is using spine version 3.5 originally. And have been using binary format.

So I believe I need to upgrade the spine runtime to 3.7, and re-export all the binary spine skeleton data using spine 3.7 in order to make everything fine again.

So here is the problem. Some of our spine are made a long time ago and their original spine project seems to be lost. And I cannot get the project and re-export the new skeleton data. I only got those 3.5 skeleton data in front of me.

Any way I can do to incorporate the 3.5 skeleton data to unity 2019? Or Is there any way I can still keep the spine 3.5 runtime in unity 2019, by modifying some of the runtime code? :tear:

Desperately need help, thx
.Winning.
  • Posts: 4

Harald

Hello,
You can use the menu entry Spine -> Import Data... to import your exported assets. Then re-export the project from Spine 3.7 to use it with the 3.7 Spine-Unity runtime.
We do not recommend adapting Spine 3.5 for Unity 2019.
User avatar
Harald

Harri
  • Posts: 4101

.Winning.

Thanks. I tried.
The following ERROR message will pop up when I tried to import the spine 3.5 skel.bytes file into the 3.7 editor

"An error occurred while importing the skeleton. Please be sure to choose a valid skeleton JSON or binary file."

Thanks for your help.
.Winning.
  • Posts: 4

Harald

Have you tried importing the data in an older Spine version (especially in the version that has been used to export the files) and then upgrading the project to Spine 3.7 (by opening the project in the new Spine editor version)?

You can quickly switch versions via Spine -> Settings Spine version. After restarting Spine you are at your desired Spine editor version.
User avatar
Harald

Harri
  • Posts: 4101

.Winning.

Coz I though that new version editor can open older version project as well. Guess it doesn't apply to data import?


And this won't affect the texture packing, right? So that I can keep the old atlas and atlas txt? Just to make sure. :)
Thanks anyway~

But I'm having another problem here. It works when I manually open the editor to import data. But since I get a hundred of spine, I plan to use command line to do the work for me. It work perfectly when I export data. But when I import data in cmd. It just open the editor for me, but the data is not imported. Any clue? ......
.Winning.
  • Posts: 4

Harald

And this won't affect the texture packing, right? So that I can keep the old atlas and atlas txt? Just to make sure. :)
The old atlas (.atlas.txt and png files) can still be used.

Note that you could also use Spine's Texture Unpacker to restore your images from a packed atlas (you need both the .atlas.txt and png files).
But when I import data in cmd. It just open the editor for me, but the data is not imported. Any clue?
Can you post the command line commands that you are using?
User avatar
Harald

Harri
  • Posts: 4101

.Winning.

Spine -i myPath\char_01.skel -o myPath\tmp.spine -r

-> editor opened with empty project. "Started." log returned.
And no spine project spine appeared as it is not saved yet.
( It also says "Error reading hotkeys.txt file" but this is always the case even when I manually open my own editor)

I have tried several cases with existed output project file / non-existed output project file; input data file / input folder path; skeleton name omitted/ with a skeleton name, and they didn't make any difference
(The file path work fine as I used the same path to perform export action)

This is the case for spine 3.5 editor, coz my data is 3.5 spine.
I've also tried using spine 3.7 editor to import my 3.5 spine data.
"ERROR: Unable to import skeleton
ArrayOutOfBounds: 116 at IN.a<SourceFile:222>" is returned.

However, I have just tried using 3.7 editor to import a 3.7 spine data for experiment. It works. Spine editor didn't opened but a spine project is created.
Seems like it is the problem for spine 3.5 editor(?)
.Winning.
  • Posts: 4

Harald

Spine -i myPath\char_01.skel -o myPath\tmp.spine -r
Back at the time of version 3.5.51 there seems to have been no -r parameter on the command line:
https://web.archive.org/web/20161230224555/http://esotericsoftware.com/spine-export/#Usage

You could either try different syntax from this docs page, or try Spine 3.6 (e.g. 3.6.53), since the first time the -r option appears on waybackmachine is 2018/05/14:
https://web.archive.org/web/20180514003607/http://esotericsoftware.com/spine-export

Apart from that, maybe doing it via the GUI could be the quickest way before trying all different sorts of versions.
User avatar
Harald

Harri
  • Posts: 4101

qppistc

Hey,I have the same problem when use command line in spine3.5 to import skel to generate .spine project. It's failed and just open spine.exe and do nothing
qppistc
  • Posts: 13

Mario

Please send us you spine.log file as described here Spine Troubleshooting
User avatar
Mario

Mario
  • Posts: 3082

qppistc

[quote="Mario"][/quote]

I change my way to export,Import skel data and export json. It works,but there is another problem.
I use this way to export 1700+ spine file,but 100+ failed,the exported json file is empty.
the error log is

Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_L_Ear
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Back_Hair
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Coat_Back
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_L_Coat
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_L_Forearm
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_L_Hood
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Waist
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Belt
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Coat
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Forearm
Nonessential not checked when exporting, internal edges lost for mesh attachment: F_Belt_B
Nonessential not checked when exporting, internal edges lost for mesh attachment: F_Collar
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Tie
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Hood
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_L_Earphone_B
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_L_Hair
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Hair
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Front_Hair_B_D
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Front_Hair_C
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Front_Hair_A
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Ear
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Earphone_B
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_R_Earphone_A
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Front_Hair_B
Nonessential not checked when exporting, internal edges lost for weighted mesh attachment: F_Front_Hair_B_B

JSON export: <removed>
ERROR: Unable to start: Spine 3.5.51
ERROR: An unexpected error has occurred:
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at com.esotericsoftware.spine.editor.launcher.Launcher._(_:523)
at com.esotericsoftware.spine.editor.launcher.Launcher.F(_:383)
at com.esotericsoftware.spine.editor.launcher.Launcher.<init>(_:173)
at s.OLA.run(_:858)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$600(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at sa.a(SourceFile:459)
at sa.a(SourceFile:299)
at sa.a(SourceFile:94)
at sh.a(SourceFile:71)
at kO.a(SourceFile:131)
at kO.a(SourceFile:86)
at com.esotericsoftware.spine.editor.Editor.a(SourceFile:1342)
at com.esotericsoftware.spine.editor.Editor.main(SourceFile:1313)
... 22 more

The spine.log and example is upload.Please use command line import this skel and export to json by 3.5.51,it should show error.
Thanks!
You do not have the required permissions to view the files attached to this post.
qppistc
  • Posts: 13

Mario

Please also provide the full command line you used to import this specific example.skel.
User avatar
Mario

Mario
  • Posts: 3082

qppistc

Spine -i E:\Temp\example.skel -o E:\Temp\exampleExport -e E:\Temp\SpineTest\jsonExport.json -u 3.5.51

I think my command line may right,because i exported 1000+ successed and 100+ failed. I use spine GUI import it and export is ok, only command line failed. I think it maybe single spine's project's problem, it may use some feature that command line export not supported.

export json is:
{
"class": "com.esotericsoftware.spine.editor.Prefs$ExportJson",
"project": null,
"output": "",
"extension": ".json",
"format": "JSON",
"nonessential": true,
"prettyPrint": true,
"createAtlas": false,
"texturePacker": null
}

---

---

Mario wrote:Please also provide the full command line you used to import this specific example.skel.
Hello,how it going?
qppistc
  • Posts: 13

Mario

I was able to reproduce the error. We are working on it.
User avatar
Mario

Mario
  • Posts: 3082

Nate

The error appears to be that a path attachment doesn't have the lengths of its segments computed in the setup pose. It seems 3.5.51 has a bug where the lengths don't get computed when run from the CLI, that's why import succeeds when done from the UI. Unfortunately 3.5.51 is very old and it would be very difficult for us to make any changes and create a new 3.5 build.

Thankfully I found a workaround for you. When you do CLI export, Spine uses a "headless" mode when possible. This is faster because it avoids creating the Spine window, all the UI, etc. Image and video exports can't use headless mode because they require use of OpenGL, which needs the Spine window/etc. What you can do is include one image/video export so Spine doesn't use headless mode, then your exports will happen more similarly to using the UI.
spine -u 3.5.51 -i example.skel -o test.png -e png.json -i example.skel -o . -e export.json
The -i example.skel -o test.png -e png.json using this png.json exports a single frame and is needed to avoid headless more. After that you can include any number of exports and they will all be done using non-headless mode, which avoids the 3.5.51 bug.
User avatar
Nate

Nate
  • Posts: 11935

qppistc

Nate wrote:The error appears to be that a path attachment doesn't have the lengths of its segments computed in the setup pose. It seems 3.5.51 has a bug where the lengths don't get computed when run from the CLI, that's why import succeeds when done from the UI. Unfortunately 3.5.51 is very old and it would be very difficult for us to make any changes and create a new 3.5 build.

Thankfully I found a workaround for you. When you do CLI export, Spine uses a "headless" mode when possible. This is faster because it avoids creating the Spine window, all the UI, etc. Image and video exports can't use headless mode because they require use of OpenGL, which needs the Spine window/etc. What you can do is include one image/video export so Spine doesn't use headless mode, then your exports will happen more similarly to using the UI.
spine -u 3.5.51 -i example.skel -o test.png -e png.json -i example.skel -o . -e export.json
The -i example.skel -o test.png -e png.json using this png.json exports a single frame and is needed to avoid headless more. After that you can include any number of exports and they will all be done using non-headless mode, which avoids the 3.5.51 bug.
Wow, that's work! Thansks a lot!
qppistc
  • Posts: 13

Nate

:cooldoge:
User avatar
Nate

Nate
  • Posts: 11935

qppistc

Hey,I'm sorry I meet another problem that need help :sweat:
I find accuracy diff by my export way:I import skel and export json by 3.5.51,and use spine3.8 import this json and export binary. This is because binary to json lose accuracy. Is there any way to fix it?

My core case is our project want to update to spine3.8.99 from 3.5.51,and we have 1700+ spine skel need to re-generate,so CLI is need.

I have tried use spine GUI import skel data to generate .spine project,and use 3.8 to open it and export binary,it's perfect.The only problem is that I can't use command line to generate .spine in 3.5 as this blog say.

My command line is
spine -i example.skel -o test.spine -u 3.5.51 -r

It's only open Spine GUI and do nothing.The spine.log is upload.

Thanks anyway!
You do not have the required permissions to view the files attached to this post.
qppistc
  • Posts: 13

Nate

As you found, unfortunately 3.5.51 doesn't support importing data to create a Spine project. :( Your options are only to export to JSON or to use the GUI to save a project file.

Are the differences in accuracy meaningful? I would expect that not to matter most of the time, though I don't remember exactly how 3.5 behaves.
User avatar
Nate

Nate
  • Posts: 11935

qppistc

Nate wrote: Are the differences in accuracy meaningful? I would expect that not to matter most of the time, though I don't remember exactly how 3.5 behaves.
Since our characters can emit projectile from spine' bone,the accuracy may cause projectile hit target early or late one or two frame,It's do meaningful for our games.
I finally decide to use GUI to output all .spine projects,by using script record mouse operation and replay it :lol:

Thanks a lot!
qppistc
  • Posts: 13

Nate

That's actually a decent idea. Sorry you have to go to such trouble, but I'm glad it works!
User avatar
Nate

Nate
  • Posts: 11935


Return to Runtimes