C
C#13mo ago
Cat

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

title said it all
7 Replies
Cat
Cat13mo ago
TheRanger
TheRanger13mo ago
NPC.GetComponent<SpriteRenderer>().Color = new ..............
NPC.GetComponent<SpriteRenderer>().Color = new ..............
Cat
Cat13mo ago
ty
TheRanger
TheRanger13mo ago
also its .color not .Color and its type isnt Vector4 its Color you should check Unity's API
Cat
Cat13mo ago
oh ty
Accord
Accord13mo 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.