Quantcast
Channel: Questions in topic: "renderer.enabled"
Viewing all articles
Browse latest Browse all 99

Turn on/off renderer for objects found with "FindGameObjectsWithTag"

$
0
0
Hello, I'm trying to display a level of a game by enabling the mesh renderer for all the objects in the level once the player reaches a certain checkpoint and collides with it, but I can't seem to make the code work: if (collision.collider.name == "checkpoint1") { GameObject.FindGameObjectsWithTag("level2").renderer.enabled = true; } The problem is .renderer property cannot be used with the GameObjects finder. Does anybody know a way to solve this or an alternative? Thanks.

Viewing all articles
Browse latest Browse all 99

Trending Articles



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