Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: krane on January 29, 2017, 09:37:57 AM

Title: How to do simple texture swap 2d [SOLVED]
Post by: krane on January 29, 2017, 09:37:57 AM
I would like to swap a texture of a 2d game object on a button click.
I can't seem to figure this out. can anyone walk me through it?
Title: Re: How to do simple texture swap 2d
Post by: djaydino on January 29, 2017, 12:45:44 PM
Hi,
There is a custom action on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) called 'Swap sprite' that you can use.
Title: Re: How to do simple texture swap 2d
Post by: krane on January 30, 2017, 09:28:51 AM
thank you!
Title: Re: How to do simple texture swap 2d
Post by: krane on February 01, 2017, 09:51:12 AM
I can't get sprite swap or sprite swap random to work at all.
I've got a uGui button and a canvas image (sprite)
I press the button to send click with ugui/onclick and it doesn't swap the sprite.
can anyone help me out with a quick demo? sorry. I feel like an idiot for not being able to get this working.
Title: Re: How to do simple texture swap 2d
Post by: djaydino on February 01, 2017, 02:10:31 PM
Hi,
You should get "ugui proxy full" package on the Ecosystem.
it has most actions for ugui
after installed, look for "ugui image set sprite"

swap sprite is for 2d

Also a tutorial to use ugui proxy for using buttons and sliders here :

Title: Re: How to do simple texture swap 2d
Post by: krane on February 02, 2017, 08:36:44 AM
Yes, i already have the ugui proxy and i'm using the sprite swap because it's for 2d. I want 2d. Thank you.

The problem is I can't get it to work.
Title: Re: How to do simple texture swap 2d
Post by: djaydino on February 02, 2017, 10:05:29 AM
Hi,
If you want to change sprite from the ugui you need to use "ugui image set sprite"

"sprite swap" and "sprite swap random" only work on 2d GameObjects
Title: Re: How to do simple texture swap 2d
Post by: krane on February 02, 2017, 10:16:55 AM
Ah crap. No wonder. Thanks!