I’m not sure if I follow what you are saying. You have a shader that takes two textures for palette swapping, but the material doesn’t update when you edit the shader?
What do you change in the shader code and exactly what does not change? Nothing happens?
Can you explain what’s wrong with that screenshot? You got two same character clones with different palettes mapped on them? Is this yours or a reference, as it looks like a palette swap that is working ok.
Materials should use the current, latest version of your shader code. If you change a single character in the code and save the file, the shader should be compiled again.
But if you suspect that your shader does not compile correctly (which might sometimes happen), right click on a shader file and select “Reimport”. This forces recompilation.
I changed the file I am currently taking in. The shader’s code isn’t changed.
For a rough timeline, it went something like:
Shader is made and takes in a file that changes the character’s color to red.
Material1 is made with the shader, the character’s color changes to red.
Shader is edited to now take in a file that changes the character’s color to purple.
Material2 is made with the shader, the character’s color changes to purple, but Material1 still changes the color to red.
I just re-imported each file and it didn’t seem to change anything. Here’s the shader taking in one of the colors as “Color Data” https://i.imgur.com/PWMjQJi.png
Here’s one of the two shaders; the other one looks identical but it has a different thumbnail to reflect the pink color. https://i.imgur.com/zP5dDwW.png
And here’s the two objects in the projects view. https://i.imgur.com/lrk7vqW.png
Ah. What you’re experiencing is expected behavior.
When you set texture values on a shader, you’re just settings defaults for materials to use when they’re created in the editor. Once a material is created, it no longer pays any attention to the settings in the shader as those settings are overridden by the material’s own songs. And if you make a material at runtime from a shader it won’t use those settings either, they only exist in the editor at edit mode creation time.
Basically Unity has no concept of material or shader hierarchy, a material’s properties exist on their own with no tie back to the shader (apart from the shader defining what properties exist).