Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: isubka on May 24, 2017, 04:32:03 AM

Title: Change Sprite by Name
Post by: isubka 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!
Title: Re: Change Sprite by Name
Post by: Phuzz 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.
Title: Re: Change Sprite by Name
Post by: isubka 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?