2D Toolkit Forum

2D Toolkit => Support => Topic started by: unity_stark on June 26, 2013, 08:54:18 pm

Title: How to keep custom shader setting when changing the sprite?
Post by: unity_stark on June 26, 2013, 08:54:18 pm
I follow your suggestion last time and create the custom shader and palette.
Now it's working! Thanks a lot!

But now I encounter the new problem.
Every time when I change the sprite at run time, it seems lost the connection between atlas0 material and custom shader.
The sprite can't display correctly.

I have to set the custom shader again after I change the sprite.

Do you have any suggestions?
Title: Re: How to keep custom shader setting when changing the sprite?
Post by: unikronsoftware on June 26, 2013, 09:14:55 pm
You should assign it to atlas 0 material in the inspector before the game starts.
That will assign it on all sprites using that collection.