playMaker

Author Topic: Change Sprite by Name  (Read 140 times)

isubka

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Change Sprite by Name
« on: May 24, 2017, 01:32:03 AM »
Hi everyone,

I need to change a sprite on play. I'm trying to do this with Set Property, I drag the Sprite Renderer from the Game Object and then, in property, choose the option Sprite>name (and I write the name of my sprite). This is not working, any ideas?

Thank you!

Phuzz

  • Junior Playmaker
  • **
  • Posts: 95
    • View Profile
    • Bzilla Games
Re: Change Sprite by Name
« Reply #1 on: May 24, 2017, 02:16:37 AM »
That will rename the sprite you currently have because "name" falls under a string variable. You should use, set property Sprite > Sprite, and drag the sprite you need to use in to the value.
Bzilla Games "Education with a Tickle!"
Qbucket Games "Voxel Games"

isubka

  • Playmaker Newbie
  • *
  • Posts: 2
    • View Profile
Re: Change Sprite by Name
« Reply #2 on: May 24, 2017, 02:22:01 AM »
I need to change the sprite during runtime so dragging the sprite is not an option, any other solution?