C
C#2y ago
Caitlin

❔ how do i call the sprite renderer component in a C# script

title said it all
7 Replies
Caitlin
CaitlinOP2y ago
TheRanger
TheRanger2y ago
NPC.GetComponent<SpriteRenderer>().Color = new ..............
NPC.GetComponent<SpriteRenderer>().Color = new ..............
Caitlin
CaitlinOP2y ago
ty
TheRanger
TheRanger2y ago
also its .color not .Color and its type isnt Vector4 its Color you should check Unity's API
Caitlin
CaitlinOP2y ago
oh ty
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?