Zaizeku

Hi, I've been trying a few times to follow the instructions set for importing the animations into unity, but I can't seem to get the Add Mix prompt to choose the animations, so there is something wrong with my spine json file probably.

All of the example spine projects work fine even if I export them myself, but when I try one I did, it doesn't work, and I'm pulling my hair here as to why this is happening =\. I did notice that the my spine model is a little bigger than the Dragon example, would this have anything to do with it?

Have any of you guys encountered this problem and how were you able to get it right? Thanks in advance
Zaizeku
  • Сообщения: 14

Nate

What exactly is the problem? Is there anything in the Console window?
Аватара пользователя
Nate

Nate
  • Сообщения: 11260

Zaizeku

Hi nate,

Ok, even if it doesn't show me the Add Mix prompt in the skeleton data asset I attempted to add the animation to the hierarchy, and it gives me the following error, any idea why this is?

Skeleton JSON file not set for skeleton data asset: monsterSkeletonData
UnityEngine.Debug:LogWarning(Object, Object)
SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/spine-unity/Assets/Spine/SkeletonDataAsset.cs:65)
SkeletonComponent:Update() (at Assets/spine-unity/Assets/Spine/SkeletonComponent.cs:96)
Zaizeku
  • Сообщения: 14

Nate

You have not set the Skeleton JSON field for your SkeletonData asset named monsterSkeletonData.
Аватара пользователя
Nate

Nate
  • Сообщения: 11260

Zaizeku

Hmm that's odd, I had set the JSON field, either way I set it again and the Add Mix prompt is still not present, with the JSON field Added I get this message

Error reading skeleton JSON file for skeleton data asset: monsterSkeletonData
Region not found in atlas: Left_Wing_0 (region)
at Spine.AtlasAttachmentLoader.NewAttachment (Spine.Skin skin, AttachmentType type, System.String name) [0x0002c] in C:\Users\Qwerty\Documents\TestProject\Assets\spine-unity\Assets\Spine\spine-csharp\src\Attachments\AtlasAttachmentLoader.cs:49
at Spine.SkeletonJson.ReadAttachment (Spine.Skin skin, System.String name, System.Collections.Generic.Dictionary`2 map) [0x0005a] in C:\Users\Qwerty\Documents\TestProject\Assets\spine-unity\Assets\Spine\spine-csharp\src\SkeletonJson.cs:196
at Spine.SkeletonJson.ReadSkeletonData (System.IO.TextReader reader) [0x003ae] in C:\Users\Qwerty\Documents\TestProject\Assets\spine-unity\Assets\Spine\spine-csharp\src\SkeletonJson.cs:154
at SkeletonDataAsset.GetSkeletonData (Boolean quiet) [0x000a9] in C:\Users\Qwerty\Documents\TestProject\Assets\spine-unity\Assets\Spine\SkeletonDataAsset.cs:82
UnityEngine.Debug:Log(Object, Object)
SkeletonDataAsset:GetSkeletonData(Boolean) (at Assets/spine-unity/Assets/Spine/SkeletonDataAsset.cs:85)
SkeletonComponent:Update() (at Assets/spine-unity/Assets/Spine/SkeletonComponent.cs:96)
Zaizeku
  • Сообщения: 14

Nate

Your atlas needs a region named Left_Wing_0 because you have a region attachment with that same name.
Аватара пользователя
Nate

Nate
  • Сообщения: 11260

Zaizeku

Ok I got it working now, the error was thanks to my naming convention, like for example Left_Wing_0, what I noticed is when I exported the project to use it in unity, my atlas file came out incomplete, I would get Left_Wing repeatedly instead Left_Wing_0, Left_Wing_1, Left_Wing_2 and so on. So I think that's a bug in spine when exporting it truncates whats after an underscore if there is only a number. You might want to look into that Nate. Thanks again =)
Zaizeku
  • Сообщения: 14

Nate

Ahhh, sorry I didn't think of that earlier. Uncheck "use indexes" in the texture packer settings. If it is checked then if an image file name ends with underscore and then a number (eg animation_23.png), the number is considered the "index" and is stored separately. The image name is stored without the underscore and index. This way a list of all images with the same name can be retrieved, ordered by index. This makes it easy to pack animations without losing the order of the frames, but this feature isn't useful for Spine (yet).
Аватара пользователя
Nate

Nate
  • Сообщения: 11260

Zaizeku

Oh LOL, thanks Nate now I know. Keep at it man, Spine is one hell of a tool XD. Thanks again!
Zaizeku
  • Сообщения: 14


Вернуться в Editor