clearTrack
), When I did this the attachment disappeared!-however it reappeared the frame after. Although the animation on track 1, does key the attachment on, it is on frame 0, and no keys exist anywhere else.
BinaryCats
clearTrack
), When I did this the attachment disappeared! 6 years ago
Pharan
6 years ago
BinaryCats
the physical render of the spine object, As I 'continue' the code after a break point, the next frame* it hit another break point (setting animation on track 0) at which point the attachment was not visible. then, on the next `continue of the code and breakpoint hit' the attachment was visable again.Pharan wrote:I had to look up "IIRC".
Did you keep track of the value of slot.attachment? (as opposed to what the render looks like)
It may be useful so we know if it's the underlying spine-csharp that's misbehaving, or the spine-unity renderer.
6 years ago
Xelnath
6 years ago
BinaryCats
6 years ago
Nate
6 years ago
Pharan
6 years ago
BinaryCats
A
on (20frames)A
off.A
stays visable. 6 years ago
Nate
6 years ago
BinaryCats
there was a BUG! IN THE past, you got lucky (punk) with new runtimesNate wrote:There is no bug? My favorite kind of bug!
Attack_Knife_intro
(60 frames track 0). Then I interrupt that animation (I damage the character) and it plays an animation TakeHit_Upper
( 30 frames track 0). On the same frame, I play animation Attachment_Knife_Off
(1 Frame, track 1)Attack_Knife_intro
Turns Attachment knife_a
ON, in slot WeaponA
- first frame.TakeHit_Upper
DOES NOT ALTER slot WeaponA
, At all.Attack_Knife_intro
Turns Attachment knife_a
OFF, in slot WeaponA
- first frame.slot
: current image
to new image
currenttime lastTime
. Is this so it never misses an attachment keyframe? 6 years ago
Nate
lastTime
. This allows 2 tracks to key attachment changes and the higher track wins since it is applied last. If we checked lastTime
to trigger the attachment change then the most recent track to set the attachment wins, which doesn't make sense as the higher track wins for all other types of keys. 6 years ago
yookunka
I'm sorry I don't get your comment well. So do I need to turn an attachment off at a beginning of every animation if the animation doesn't need it? This isn't ideal at all because I need to modify all the animation if I add a new attachment. I want attachment's current state (on or off) to remain unless a higher track changes it when animation changes.We recently changed back to always setting the attachment rather than using lastTime. This allows 2 tracks to key attachment changes and the higher track wins since it is applied last. If we checked lastTime to trigger the attachment change then the most recent track to set the attachment wins, which doesn't make sense as the higher track wins for all other types of keys.
6 years ago
Pharan
slot.Attachment = null
. You return it to setup pose by saying slot.SetToSetupPose()
. You could conceivably do that whenever an animation starts or ends (using the existing animation callbacks). Spine-Unity actually has some extra methods that make it easier to find the right items to reset. 6 years ago
yookunka
6 years ago
Pharan
6 years ago
BinaryCats
So what is the solution here?Nate wrote:We recently changed back to always setting the attachment rather than usinglastTime
. This allows 2 tracks to key attachment changes and the higher track wins since it is applied last. If we checkedlastTime
to trigger the attachment change then the most recent track to set the attachment wins, which doesn't make sense as the higher track wins for all other types of keys.
previous.apply
)?, or it should not apply any keys before the mixing happened?I am unsure what you mean byNate wrote:If we checkedlastTime
to trigger the attachment change then the most recent track to set the attachment wins, which doesn't make sense as the higher track wins for all other types of keys.
the most recent track to set the attachment
. If you mean that the most recent attachment-key to be fired( regardless of what track it is on ) to be applied, this is what you want... isn't it? 6 years ago
Nate
Track 0 is applied, then track 1. If both key an attachment, track 1 will be the most recent track to set the attachment.BinaryCats wrote:I am unsure what you mean by the most recent track to set the attachment.
6 years ago
BinaryCats
....Nate wrote:BinaryCats, honestly I'm still not sure what problem you are having. I need it to know 1) what you are doing, 2) what actually happened, and 3) what you expected to happen. If you can do that as concisely as possible that would help. If you leave out any of those, it is hard to guess at the problem and then confusing if I guess wrong.Track 0 is applied, then track 1. If both key an attachment, track 1 will be the most recent track to set the attachment.BinaryCats wrote:I am unsure what you mean by the most recent track to set the attachment.
6 years ago
yookunka
Yeah, I agree with BinaryCats as I have the same problem.The attachment should remain off. Attachment keys outside of the mixing time SHOULD NOT have a say on if a slot is turned on or off.
6 years ago
Pharan
6 years ago
BinaryCats
6 years ago
Pharan
6 years ago
BinaryCats
6 years ago
Nate
apply
, it's very simple:previous.animation.apply
line, above: 6 years ago
BinaryCats
a
would be visible? I would have thought c
should be visible as it is the most recent change of that slot. 6 years ago