Hi,
I'm still learning Spine these days, so this might be a stupid question, but here it is :
I have a character with a weapon. The weapon has a 0 opacity on most animations, and a 1 opacity when shooting.
This works great in Spine, I only see the weapon when playing the shoot animation.
When I import the data in Unity, and create my character using the "instanciate skeleton animation" method, everything's great, the weapon is only visible when needed.
If I bake that same skin however, the weapon is always visible. Now I could hide it in code, but is this the expected behavior ?
Page 1 of 1
reuno
8 years ago
- reuno
- Posts: 8
Mitch
Doesn't support color keys
sorry.

8 years ago
-
Mitch - Posts: 978
reuno
Ok, I was wondering what I got wrong. Is this something that will happen someday, or shouldn't I wait for it ?
8 years ago
- reuno
- Posts: 8
Pharan
It will only happen if Unity supports it. And there hasn't been any word on that, I think. So I wouldn't count on it.
If you're only hiding and showing the weapon, you should be setting an attachment/slot key, not a slot color key: http://esotericsoftware.com/spine-key-f ... ttachments
That will work fine in baked-Unity.
It wasn't the best way to do it anyway. Even if the opacity is 0, it's still being rendered. If you do this to a lot of things, it'll slow down the game.
If you're only hiding and showing the weapon, you should be setting an attachment/slot key, not a slot color key: http://esotericsoftware.com/spine-key-f ... ttachments
That will work fine in baked-Unity.
It wasn't the best way to do it anyway. Even if the opacity is 0, it's still being rendered. If you do this to a lot of things, it'll slow down the game.
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
8 years ago
-
Pharan - Posts: 5366
reuno
@Pharan > indeed, this seems much cleaner. Thanks a lot.
I'm still having trouble with it though. Here's my process :

I have this character that is usually sporting a shotgun in most animations. For one special animation, I need him to NOT have the shotgun. Following your advice, I've created two attachments : the usual gun skin attachment, and an empty one (I've also tried having a skin attachment on the empty slot, but this doesn't change a thing).

Then I switch to Animate, select the animation where I don't want the shotgun to appear, click on the visibility dot, the key turns yellow, I click on it, it adds a key in the timeline. Other animations are unchanged, this one looks great, all is well.

I export my data, import them into Unity, and if I select the skeleton data and preview this particular animation, again, everything's great, the shotgun is hidden. The other animations are fine too.

Now if I bake all the skins, and play that animation, the shotgun's still visible, and it shouldn't be.
Am I doing something wrong here ?
I'm still having trouble with it though. Here's my process :

I have this character that is usually sporting a shotgun in most animations. For one special animation, I need him to NOT have the shotgun. Following your advice, I've created two attachments : the usual gun skin attachment, and an empty one (I've also tried having a skin attachment on the empty slot, but this doesn't change a thing).

Then I switch to Animate, select the animation where I don't want the shotgun to appear, click on the visibility dot, the key turns yellow, I click on it, it adds a key in the timeline. Other animations are unchanged, this one looks great, all is well.

I export my data, import them into Unity, and if I select the skeleton data and preview this particular animation, again, everything's great, the shotgun is hidden. The other animations are fine too.

Now if I bake all the skins, and play that animation, the shotgun's still visible, and it shouldn't be.
Am I doing something wrong here ?
8 years ago
- reuno
- Posts: 8
Pharan
Now this is a question for Mitch. 

Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
8 years ago
-
Pharan - Posts: 5366
Mitch
Err... is empty like... a blank PNG? because you could just set the key to "Off" instead of having an empty one. I actually dont know what woudl happen with an empty PNG O.o
8 years ago
-
Mitch - Posts: 978
Pharan
I hadn't noticed the blank png.
@reuno
No, no. Don't use a blank png! (You didn't need one.)
You can turn the attachment off and then key the slot to be empty.
Just click on the visibility dot of the visible attachement so it becomes invisible. Then click the key.
@Nate, Shiu
See, this is why the editor needs the Image Picker GUI. XD
@reuno
No, no. Don't use a blank png! (You didn't need one.)
You can turn the attachment off and then key the slot to be empty.
Just click on the visibility dot of the visible attachement so it becomes invisible. Then click the key.
@Nate, Shiu
See, this is why the editor needs the Image Picker GUI. XD
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
8 years ago
-
Pharan - Posts: 5366
reuno
@Pharan, @Mitch, thanks for your answers.
I actually tried that at first, but as it didn't work, I went for that weird empty.png route.
I gave it another try just to be sure. In Spine it works great, but in Unity though, after baking, everything appears, for all animations, as it is in Setup mode.
I'm not ruling out the possibility that I'm completely stupid, and I'm sorry if I'm missing the obvious here, but as I really love Spine, and as it's the last thing I have that's not working as I'd like it to, I'd really like to understand
Here's what I do :

I'll add that I've tried other combinations (hiding gun and saber in setup and showing them in animate, hiding only the saber in setup, you get the idea).
I actually tried that at first, but as it didn't work, I went for that weird empty.png route.
I gave it another try just to be sure. In Spine it works great, but in Unity though, after baking, everything appears, for all animations, as it is in Setup mode.
I'm not ruling out the possibility that I'm completely stupid, and I'm sorry if I'm missing the obvious here, but as I really love Spine, and as it's the last thing I have that's not working as I'd like it to, I'd really like to understand

Here's what I do :

I'll add that I've tried other combinations (hiding gun and saber in setup and showing them in animate, hiding only the saber in setup, you get the idea).
8 years ago
- reuno
- Posts: 8
Pharan
Unity's animations definitely supports hiding images (which in Unity is equivalent to disabling GameObjects).
It must be a bug in the Baking process.
It must be a bug in the Baking process.
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
8 years ago
-
Pharan - Posts: 5366
Søren
Yeah we know, I miss it myself sometimes. We need more hours per dayPharan wrote:I hadn't noticed the blank png.
@reuno
No, no. Don't use a blank png! (You didn't need one.)
You can turn the attachment off and then key the slot to be empty.
Just click on the visibility dot of the visible attachement so it becomes invisible. Then click the key.
@Nate, Shiu
See, this is why the editor needs the Image Picker GUI. XD

8 years ago
-
Søren - Posts: 2453
Pharan
@Shiu
Haha! I feel you, man. Hope you two are doing fine.
I'm being pulled in all sorts of directions myself these days.
And some people have the nerve to complain about boredom.
@Mitch
BUG
Haha! I feel you, man. Hope you two are doing fine.
I'm being pulled in all sorts of directions myself these days.
And some people have the nerve to complain about boredom.

@Mitch
BUG
Spine-Unity Docs Repo, and check out the Unofficial Spine Users Tumblr.
8 years ago
-
Pharan - Posts: 5366
Nate
That Pharan is such a bugger! 

8 years ago
-
Nate - Posts: 12213
jbsunking
I'm having a similar issue.
I have animated a blend between two image assets.
I have an image of a dog's head (front-on) that fades to transparency. At the same time, I fade in the 2nd image of a dog's head (in profile), from transparency to opaque.
Looks great in Spine.
I export to Unity (4.6.2) and see in the Preview pane that the first run of the animation displays fine [fig 1], but the 2nd run (or looping display) is missing the profile head asset [fig 2].
Finally, when he reaches the top, the front-on head asset appears [fig 3].
I have animated a blend between two image assets.
I have an image of a dog's head (front-on) that fades to transparency. At the same time, I fade in the 2nd image of a dog's head (in profile), from transparency to opaque.
Looks great in Spine.
I export to Unity (4.6.2) and see in the Preview pane that the first run of the animation displays fine [fig 1], but the 2nd run (or looping display) is missing the profile head asset [fig 2].
Finally, when he reaches the top, the front-on head asset appears [fig 3].
You do not have the required permissions to view the files attached to this post.
7 years ago
- jbsunking
- Posts: 3
dirkmalta
Excuse my ignorance on Spine. I've been working with it for 2 months and loving it. However it there some sort of video tutorial of how best to bake animations. Also what sort of limitation and benefits is gained through baking?
Thanks
Thanks
Creating a platform adventure game where time is manipulated when you move. Every step count!
And of course we using Spine ;-)
https://twitter.com/gloomvideogame
And of course we using Spine ;-)
https://twitter.com/gloomvideogame
7 years ago
-
dirkmalta - Posts: 5
Mark topic unread
• Page 1 of 1
Return to Unity
- All times are UTC