- Home /
Why would a custom shader be unable to change sprites?
I've created a pretty straightforward shader, using shader forge, following this tutorial. It works, but switching sprites, either in code (image.sprite = otherSprite, also tried image.material.SetTexture("_MainTex", otherTexture)) or using the inspector, no longer works.
I can set it the first time in the inspector, but after that no changes to the sprite have any impact. If I switch back to the default shader, that functionality works properly again.
What might I be doing that would prevent me from effectively changing sprites?
Thank you.
Comment