Question by
TapTrap2090 · Jun 05 at 04:03 AM ·
child objectcomponents
Get spriteRenderer component of child sprite
I have a gameobject with a script on it and a child sprite, In the script i want to get the spriteRenderer component of the sprite child, how would i do this?
Comment
Answer by mmak28_6 · 5 days ago
SpriteRenderer childSr= transform.Find("child").GetComponent<SpriteRenderer>();
Would it be like this?
Your answer