0
Changing color of an object
simple: I have a 2d object in Unity, and I want to change it's color. is the only way to do this to Port it to drawing software and change it there, or is there a simpler way to do it.
4 Answers
+ 2
gameObject.GetComponent<Renderer>().material.color = Color.green;
or instead of Color.green you can do new Color (r, g, b);
+ 1
it could be any script attached to the object you want to change. maybe in the Start method unless you need it elsewhere
cause the first variable "gameObject" is the object that the script is attached to
0
where would I type this? make a new script or change the object's script?
0
alright thanks