Search Unity

Is there a way to replace a sprite in a spritesheet while maintaining "Bind Poses"?

Discussion in '2D Experimental Preview' started by yuch3n, Mar 25, 2019.

  1. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    13
    I managed to rig my 2d character up with bones and have her animating. However, now I want to try to change the colour of her clothing. I tried importing the new clothing as a png and replacing the Sprite field of one of the Sprite Renderers in the hierarchy with the new sprite, but now the Sprite Skin component gives me the warning "Sprite has no Bind Poses", and the sprite is being rendered with no mesh deformation at all. Is there a way to swap out images without losing the bind pose information (still a bit unclear of what that is exactly)?
     
  2. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    168
    The Sprite that you swap in will need to have the same number of bones influencing the Sprite. This means that you will need to rig the new Sprite the same way you rigged the previous Sprite.

    You can also try selecting the Sprite in Skinning Module Sprite Editor Window, press copy, switch over to the new Sprite, select it and press paste.
     
  3. ArseneySorokin

    ArseneySorokin

    Joined:
    Jan 23, 2013
    Posts:
    53
    Hello,

    Any way to do this in code during run-time?
    Where in the sprite are the bind poses saved and how can I copy them to a different sprite?
     
  4. games4ever

    games4ever

    Joined:
    Jan 23, 2014
    Posts:
    10
    Hello @yuch3n

    What about just replacing the sprite texture itselft for the new one?