Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to change the color of a sprite in unity

//option 1
GetComponent<spriteRenderer>().color = Color.red

//option 2
sprite.color = new Color (R, G, B, A);
 
PREVIOUS NEXT
Tagged: #change #color #sprite #unity
ADD COMMENT
Topic
Name
6+5 =