zeuxgame

I had ask a question while ago about using multi-materials
but final I decide to use one texture that pack by unity's SetPixel Function
and then I successfully done the work

but when I want to change material of SkeletonAnimation Object
the gameobject automatically change back to the material of atlas when change animation using setanimation
is there any simple way to do this?
please help, thanks
zeuxgame
  • Postovi: 29

Pharan

If you need to change materials per-instance, this is one way: Different materials for same Spine character

As I mentioned in that thread, SkeletonRenderer sets the materials based on the AtlasAsset every frame (every LateUpdate). It does so because multi-atlas setups potentially change the number, order and source of Materials at any given point.

If you need to change the material across all instances, you can just change the material set in the AtlasAsset. That's where SkeletonRenderer pulls its materials from.
Avatar
Pharan
  • Postovi: 5366


Natrag na Unity