• Bugs
  • Exported files not working in Unity

Related Discussions
...

Hey guys!

I’m working on a game project, and all of the characters work in Unity except this one dude. Already tried different combinations of export options and two different devs tried to import it properly with no luck.

Here's the error we keep getting.

Also got this piece of advice,

"The error dialog tells you that the runtime can not load the skeleton, because your texture atlas is missing the images (regions).

Make sure that when you export your atlas, all regions are contained in the texture atlas. The atlas is a plain text file, so you can open it with a text editor after export and see if the names from the dialog are there or not."

but I have no freaking clue how to proceed if the names from the dialog are there OR not. So I'll need even more help.

If you are one of the devs reading this, I've already emailed you all of the source files, exported files, and a fresh unity project with runtimes that we used for testing (and failed). If all I have to do is manually add a string of text to the atlas file I'll be glad to do that but I'll need detailed instructions :$ .

Thanks!

P.S.: this only happens to one of the many characters I'm currently working on, in multiple projects, exporting them with the same settings.

In Spine your attachment name/path is eg popsicle-single-back/arm-back, which is the name used to find the region in the atlas. The error means it looked in the atlas and did not find a region with this name. As mentioned in your quote above, open the atlas file with a text editor to see what texture region names it contains. You'll see names like:

E:/Google Drive/<removed>/popsicle-single/./images/popsicle-single-back/arm-back

I see you exported with 3.7.46-beta. How exactly did you create the atlas? Did you run the texture packer separately from JSON export? Did you pack the atlas as part of JSON export? If so, please let us know which of these settings you used:

图像因不支持 HTTPS 被隐藏。 | 仍然显示

Hey Nate,
thanks for the reply.

These are the settings I used and they seem to work for the other characters. The only difference is this one has two skins, the others have no skins set up. I also tried all possible combinations of checkboxes marked with a red circle.

I did not try to change the Image Atlas Pack settings tho :think: . Never changed it and it used to work so I missed it.

I'm sure I'm just missing a small detail somewhere but need help to find it, because we're having difficulties with the character for almost a week now :smirk: .

Cheers.


I feel like I've asked a dumb question with an obvious solution. Can someone just point me to it?

It's really weird that it would output the entire path down to the drive letter like that.
This isn't really a Unity thing. Somehow, the atlas files that were exported just had weird paths.

I tried exporting skeletons from the Spine project you sent, using 3.7.46-beta to match your original export, and using the current 3.7.47-beta.
I also tried exporting to my desktop, and exporting to the exact path that was saved in the project.
Checked all the settings to match.
But I just got regular atlas files with regular paths. No drive letters or anything.

Is it possible that your studio has some sort of asset pipeline automation thing or scripts processing your atlas files that would add these paths?
Could it also have something to do with it being in a Google Drive folder?

5 天 后

Is it possible that your studio has some sort of asset pipeline automation thing or scripts processing your atlas files that would add these paths? - nope, I'm using a regular pc, no special scripts or other corporate stuff

Could it also have something to do with it being in a Google Drive folder? - maybe, I'll try moving the project, but there are other characters that I've made for the same project, they share a project folder on google drive, and they work fine. The only obvious difference is that all other characters don't have skins, and this one does.


Pharan if you got the files working in Unity and the solution is so obvious that you can't even recreate my problem, can you just mail them back to me so I can forward them to the dev team, please? I tried all export options and they say the issue is still there.


So I'm blocking a whole team of 15 people with my inability to export the character so that it works in Unity 🙂 (other characters are fine). Should I just make a new file and start from scratch?
Thanks! 🙂


Just to clarify, even if I get an atlas that looks like yours, the coder says the error is still there and that the character is not working in Unity. I can't check it myself.

popsicle-single-main.png
size: 2048,2048
format: RGBA8888
filter: Nearest,Nearest
repeat: xy
arm-back
  rotate: false
  xy: 638, 1864
  size: 281, 181
  orig: 281, 181
  offset: 0, 0
  index: -1
arm-back-1
  rotate: false
  xy: 1264, 1957
  size: 159, 88
  orig: 159, 88
  offset: 0, 0
  index: -1

Please let me know if you were able to import it to Unity. And if yes, can you please email me the assets or point to correct settings, etc.

Sorry, Pharan has some things going on.

Use a text editor to replace the first part of the paths in your atlas file with nothing:

E:/Google Drive/<removed>/popsicle-single/./images/

Leaving atlas region names like:

popsicle-single-back/arm-back

This matches the attachments names in your Spine project.

If there is an error, show the error. If something doesn't render correctly, show a screenshot.

Can currently confirm this in this project particular project in 3.7.46-beta :
If "flatten paths" is unchecked, the atlas outputs the entire path including the drive letter, as seen in previous outputs.
If "flatten paths" is checked, the atlas removes the subfolders, which causes it to have a mismatch with the skeleton data, which includes "popsicle-single-back" in the attachment paths.

The path to the folder containing the project doesn't seem to matter.
I tried to export a couple of other projects with the same folder arrangement (image path "./images/" and then using subfolders under that.) but it did not seem to yield the same problem.

Right now, the quickest solution is what Nate recommended above.

Nate's solution worked. Thanks guys!

But, the issue is still there, even though I'm using latest builds as soon as they come out. Hope you'll find the reason and fix it. Meanwhile I'll edit the atlas assets manually.

Thanks again.