Arnissan

I recall from previous forum posts that Spine runtimes only render the bones active for the selected skin. But it seems that when bones are spawned via Skeleton Utility, this optimization is lost and it renders all bones once again. Do I understand this correctly? And if so, what can be done to get that back?
Arnissan
  • Сообщения: 49

badlogic

The Spine Runtimes don't render bones per se, but attachments which get their transformation from their parent bone. A bone can either be always active (it's not in any skin) or only active if the skin(s) it is contained in is also active. Only bones that are associated with a skin that is not active will not be updated when the transformations are calculated. This however doesn't have anything to do with rendering per se.

I'm not the local Unity expert, but I can't seem to find a way for SkeletonUtility to interfere with the above mechanism, as it doesn't concern itself with skins and skin bones (bones that are associated with one or more skin).

Could you expand on your problem description a little bit more? E.g. what do you expect to see and what do you actually see in your project?
Аватара пользователя
badlogic

Mario
  • Сообщения: 1999

Arnissan

It's probably my lack of understanding. I use Dynamic Bone asset to give some bones such as hair secondary movement. I wanted these physics calculations to not run if they don't apply to the currently active skin but in scene view I see them running at all times. It's probably because I've set the bone setting from "Follow" to "Override", right? Since it overrides Spine runtimes, the optimization doesn't apply to it and I have to handle this myself. I already have a skin selector logic that applies different physics settings for some of the common bones, I'll just expand on it so that it turns physics component on and off for unique bones based on the selected skin.
Arnissan
  • Сообщения: 49

badlogic

Ohhh, Dynamic Bone asset. The spine-unity runtime can't disable the dynamic bone simulation for an inactive bone, as it has no idea about that third party asset. As you said, you'll have to do some manual work here. When you change skin, you could iterate through all the bones and disable the ones not active on the dynamic bone asset side.
Аватара пользователя
badlogic

Mario
  • Сообщения: 1999

Arnissan

Makes sense. Thank you for your input. I'll do that.
Arnissan
  • Сообщения: 49


Вернуться в Unity