Hi Pharan,
Thanks for the reply.. you mean dont key everything in the first start keyframe or dont key everything in all keyframe?
Because is working for me if I key everything in the start of the animation.
SkeletonAutoreset
I mean don't key all bones transformations and slots and images and everything. That will slow down your game.
You can key all the things you already animated in other animations. That's perfectly fine.
I've looked at the code closer and I think the most appropriate solution to this (without completely destroying all the other runtimes) may be to make "specialized" versions of Spine.AnimationState.
But "specialized" may be a misnomer because I think yours is a common-enough use case that we should at least take care of it.
Oh I understand Pharan, and thank you very much for the tip.. =)
Good news. We have a functioning AnimationState version that handles your case (assuming your case is simple enough).
https://gist.github.com/pharan/77c8ab0880c33716acb8#file-animationstate-cs
Read the readme here: https://gist.github.com/pharan/77c8ab0880c33716acb8
This should remove the need for the animator to figure out which keys should go where and what to key and what not to key.
Theoretically, as long as it looks ok in Spine editor, the crossfade/mixing should work fine in this version of AnimationState.
I assume we'll be discussing this over time with Nate/Mitch regarding the suitability of its parts or whole to the rest of the runtimes in the future.
Hi Pharan! thanks for the hyper fast ninja fix =)
Look like is working but I have in my animation an alpha-color (0 to 255) object that is not showing with the new AnimationState.cs, what you think could be the problem?
That's a good catch. We need those.
But can you describe your color animation setup? Is the setup pose alpha = 0? and where are the keys? Can you share a screenshot of the dopesheets?
Hi Pharan!, sorry for the delay.. HTTPS をサポートしていないため、画像は非表示になっています。 | まだ表示する
Here is the screenshot, the key is the UpperCutEffect:
I'm not sure what's going on. What's the color in setup pose? is this the before-animation? What are each of those keys doing?
Sorry for the delay Pharan, I had some problems with my PC. HTTPS をサポートしていないため、画像は非表示になっています。 | まだ表示する
This is in the animation, I turn the UpperCutEffect in 255 Alpha here from 0
Thats the Alpha color that Im using:
Thanks
I think I know what the problem is. I don't think it was the color.
This will supposedly be fixed in v3 (attachment overriding).
But the current fix is to open Animation.cs
, look for this line: https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-csharp/src/Animation.cs#L451
And comment that out.
Thanks you Pharan, I going to test to night =)
Thanks!
Any plans to merge this into Unity runtime as an option?
Nate's in the middle of updating AnimationState for all runtimes and he's almost done with that part.
He thought the functionality was a good idea so he added it to the list of new features, along with reinstating AttachmentTimeline's old track-override-friendly and mix-friendly behavior.
Likely a different API than the one I stuck in there— possibly going to be a TrackEntry setting instead of a bool on the AnimationState. I'm not sure if he's decided on what to go with yet.
Either way, it's a significant change (you can see some of them already in AnimationState.java) so we'll have to wait til we finish porting.