Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

Find all gameObjects with same tag

$
0
0
Hello! I have a script that is suppossed to find all objects in the scene with the tag "Bar" and change a variable of the script that they have. But it doesn't work. Any help? var baricades = GameObject.FindGameObjectsWithTag("Bar"); var theScript = baricades.GetComponent("Js_Bars"); theScript.hitted = true;

Viewing all articles
Browse latest Browse all 215

Trending Articles



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