STolga

Hey everyone,

When I try to play multiple animations on different tracks, suddenly materials are gone on runtime. So spine object become invisible.

I have a simple test script:
using Spine.Unity;

public class TestSpine : MonoBehaviour
{
public SkeletonAnimation skeletonData;
public string leftArmAnim = "kol_1";
public string rightArmAnim = "kol_2";

// Start is called before the first frame update
void Start()
{
PlayMultipleTrackAnimation();
}
private void PlayMultipleTrackAnimation()
{
skeletonData.state.SetAnimation(0, leftArmAnim, true);
skeletonData.state.SetAnimation(1, rightArmAnim, true);
}
}
When I press Play. Multiple Animations plays togetger ( I can see it from the bones in scene view). But spine object becomes invisible because materials are gone.


Note: I tried it with Spine 3.8 (/w Unity 2019.x)and Spine 4.0(/w Unity 2021.x) with different spine animations. No matter what, result is the same...
Thanks for the help.
You do not have the required permissions to view the files attached to this post.
STolga
  • Posts: 3

Harald

There is nothing obviously wrong with your code or setup. Could you please check if perhaps you have a clipping attachment accidentally active in the problematic animations? Could you please share a minimal Unity project that demonstrates the problem? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context.

Alternatively you could send us the problematic skeleton assets, likely the problem is related to a problematic animation which has attachments set invisible or a clipping polygon being active.
User avatar
Harald

Harri
  • Posts: 4088

STolga

Hey I sent an email including problematic animation. I try to play kol-2 and kol-2 together then missing material issue happens

---

Hey herold,

As you mentioned above, the problem was invisible keys. On anim2 there is a key for making other parts invisable ( disable renderer) . Same for anim1 too.
So both anims making the other half invisable. This is why we cannot see anything when playing multiple anims.
STolga
  • Posts: 3

Harald

Glad to hear you've figured it out, thanks for getting back to us.

PS: you were close with spelling the name correctly in the email and forum text, but it is indeed Harald and neither Harold nor herold.
User avatar
Harald

Harri
  • Posts: 4088

STolga

Harald wrote:Glad to hear you've figured it out, thanks for getting back to us.

PS: you were close with spelling the name correctly in the email and forum text, but it is indeed Harald and neither Harold nor herold.
Hey Harald :grinteeth:

Sorry for misspelling :rolleyes: And thank you for your help :smirk:
STolga
  • Posts: 3

Harald

STolga wrote:Hey Harald :grinteeth:
Perfect, thanks for the correction! :D No harm done. ;)
User avatar
Harald

Harri
  • Posts: 4088


Return to Unity