2D Toolkit Forum
2D Toolkit => Support => Topic started by: subzaku on March 16, 2017, 04:58:09 am
-
Hi, i have a sprite collection containing my inventory sprite and the sprite is colored, i want to make cooldown effect so when it is on cooldown i'm masking the desaturated sprite over the grayscale, and when it's off cooldown, i show the colored sprite
What i did is:
1. I make 3 material, 1 for colored, 1 for desaturated, 1 for grayscale
2. Change the respective sprite material shader and apply it to each object
so far it's ok, but when i run the game all the material reverted back to the 1st material which is the colored one.
is there any way i can change the sprite color to grayscale using only 1 sprite collection and just multiple material?
thanks
Update:
I tried commenting the update material function on tk2dsprite, it works, but i wonder is it gonna cause any problem?
-
It will only cause problems if you use multi atlas spanning in tk2d. If you don't use the feature then you're fine in doing this.