prog112

Hey guys, I've run into this problem with Spine & Unity and I can't figure it out.

Say, I've got an animation ATTACK that enables special effect attachment on frame 2 and disables it on the last frame (like 20 or so).
Now, my enemies have got abilities that can break your attack and animation resulting player to change his animation from ATTACK to IDLE on frame 10.
However, this makes the special effect attachment still visible on screen, because the point where it's disabled has never been reached. Alternative? Reset it at EVERY other animation beginning. Now this is going to provide magnitude of problems if you're gonna have dozens of animations and hundreds of different effects in Spine.

Is there any other way to solve this problem?
prog112
  • Mesajlar: 8

Pharan

Hello!

Please see this topic: SkeletonAutoreset
Kullanıcı avatarı
Pharan
  • Mesajlar: 5366

prog112

Thank you!! It's a bit bummer since now I'll have to set up my armor parts attachments on every new animation, but still better than disabling all the effects!
prog112
  • Mesajlar: 8

Pharan

Attachments will survive a reset if you set them through a dynamic skin instead of just saying attachment = whatever.
Look for CustomSkin.cs in your project for the underlying logic behind that idea.
Kullanıcı avatarı
Pharan
  • Mesajlar: 5366


Dön Unity