playMaker

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

isubka

  • Playmaker Newbie
  • *
  • Posts: 2
Change Sprite by Name
« on: May 24, 2017, 04: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

  • Full Member
  • ***
  • Posts: 101
    • Bzilla Games
Re: Change Sprite by Name
« Reply #1 on: May 24, 2017, 05: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
Re: Change Sprite by Name
« Reply #2 on: May 24, 2017, 05:22:01 AM »
I need to change the sprite during runtime so dragging the sprite is not an option, any other solution?