Is it possible to tint an icon drawn by Gizmos.DrawIcon()? Assuming no, any other recommendations that aren’t too hacky?
Since DrawIcon grabs the textures by string, I don’t really see an option. You might have a bunch of different images and select them, but that’s not really a tint.
I tried looking into the source with ILspy, but DrawIcon is just a wrapper around an internal call (ie. call to the c++ engine), so there’s no chance of doing anything fun with reflection.
You could create and destroy a quad, position it correctly, and put a material with tint on it - basically implement your own icons. That’s the only thing I can think of that’s going to give you exactly what you’re looking for, but it would be a hassle.
What are you trying to do? I might have a better idea if you have the specific use case.
Tint an icon. (Without the quad hack.)
Love/Hate shows a gizmo on characters that have a “faction” component. Users can assign colors to different factions (e.g., green for companions, blue for villagers, red for goblins, etc.). Currently I provide a dropdown of 16 hand-picked colors with a tinted image for each. I thought it might be nice to let the user assign any 32-bit color, so I thought I’d throw the topic out here for discussion.