Charmandermon

I have seen many unity issues with the import and I was able to track down the problem.

You have 2 ways to solve the problem you could name all the bones and hierarchy without spaces or capitals and have the pngs rdferenced as the same names.

Now the problem I found is that in the regions of the example json data it contains "name" keys.

If you do an export now it doesn't create "name" keys it creates "path" keys. meaning at some point the data export type was tweaked and the runtimes haven't been updated.

Here is the proper fix so you don't need to reexport or rename your bones. Please include it in the next updates of runtimes. Also a quick feature request would be to add the .txt on the atlas and json data without having to manually do it. It gets kind of annoying 100 objects later...

Anyways here is the fix>>>
SkeletonJson.cs ~ line 182

you will see "name" referenced

if (map.ContainsKey("name")){
name = (String)map["name"];
}
Just add one more if check after the first if check to also check for the "path" key without it the name defaults to an improper name that the atlas does not contain. That means that your data will never work. With errors that just say can't find the named region in the atlas.
if (map.ContainsKey("path")){
name = (String)map["path"];
}
Charmandermon
  • Messaggi: 2

Søren

Please use the code tag :) makes it a lot easier (I'll edit the post for you just for convenience). Not terribly familiar with the code, however you can change the suffix when you export from .json to .txt

Avatar utente
Søren

Shiu
  • Messaggi: 2453

Charmandermon

You can edit the suffix of the json but not the atlas. Thank for code editing it!
Charmandermon
  • Messaggi: 2

Søren

Ah, sorry I misread. I really shouldn't be doing anything work related at 5:50 AM :o
Avatar utente
Søren

Shiu
  • Messaggi: 2453


Torna a Bugs