- Home /
How to change the tint programmatically for a set of meshes, or customize tint for quad meshes
I am using a quad in a 3D world with a sprite material (which is just an image). I have a lot of these quads, and I want to programmatically darken them. I could change the tint (since changing it from 1.0 down to, say, 0.573 does exactly what I want) but I am not sure how I can go about this for doing it for all of the quads I want to darken while not touching the others.
Since I want to change them on the fly, my first thought was to somehow attach some data to the mesh and have it pass it through into a custom shader, but I'm not sure the proper way to do this yet or if it's even possible.
A lot of this data is not changing either and only needs to be set when the mesh is brought into existence.
What is the best way to go about solving this problem? I am very new to Unity, please keep that in mind.
Your answer
![](https://koobas.hobune.stream/wayback/20220612225907im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to acheive wireframe effect with dots? 0 Answers
Render inside of mesh as black 2 Answers
Render sprite only behind mesh? 0 Answers
Seam on Procedural Mesh 1 Answer