Author Topic: Programmatically Changing a Sliced Sprite  (Read 1742 times)

MrClark83

  • Guest
Programmatically Changing a Sliced Sprite
« on: August 02, 2012, 01:25:49 AM »
Ive looked through the UISlicedSprite.cs and unable to locate what would work. Is there a way to change a sliced sprite from the atlas via script during runtime?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Programmatically Changing a Sliced Sprite
« Reply #1 on: August 02, 2012, 02:21:46 AM »
If you want to change from one sprite to another, change the .spriteName. All the sprites are referenced by name.

MrClark83

  • Guest
Re: Programmatically Changing a Sliced Sprite
« Reply #2 on: August 02, 2012, 02:33:46 AM »
Thank you kindly. =D