Quantcast
Viewing latest article 13
Browse Latest Browse All 98

Answer by shriya

hi David, the problem is private SpriteRenderer spriteRenderer; In this you are assigning one game object and the sprite change is also occuring on the same object. For finding all the objects either you declare array of sprite renderers public SpriteRenderer[] spriteRenderer; and assign all renderers of one tag here and inplace of if statement use foreach( sprite x in spriteRenderer) { x.GetComponent(SpriteRenderer).sprite = sprite_change; } Other way is you can use FindGameObject WithTag

Viewing latest article 13
Browse Latest Browse All 98

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>