Say, you've got a sprite of a car's body. It's white, however you'd like to make it greenish. Give it a green 'overlay', you get it. A greenish tint. Without bringing another sprite to Unity, and possibly its animations.
Is it possible to turn it greenish solely by using things that are built into Unity? Materials, Shaders, sprite manipulation, whatever.
Answer by RobAnthem
Mar 18 at 08:06 PM
Well you could always do this with code. The sprite is managed by the SpriteRenderer component.
public class SpriteColorer
private SpriteRenderer sprite;
public Color color;
sprite = gameObject.GetComponent<SpriteRenderer>();
public void ChangeColor()
sprite.color = color;
Thank you, didn't know about the ingenious SpriteRenderer.color
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
107 People are following this question.
2d Animation sprites - right way?
How do you create moving 2d effects?
Unity Animator transition on collision
2D animations - same controller for different characters
Transition between 2D animations with different frame width