Question by
aureliadev · Jun 11, 2021 at 03:58 PM ·
gameobjectsnamefor loop
Boucle for sur gameObject.name
Bonjour,
Je déclare public GameObject casename1; jusqu'à public GameObject casename30;
et ensuite je fais une boucle for(var i = 1; i < 31; i++){ casename[i].GetComponent().enabled = true; }
mais le code ne fonctionne pas. Comment puis je faire ?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613034905im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem about finding script name 1 Answer
Skybox Shader Procedural Parameter via Code names? 1 Answer
How to correctly count number of objects? 2 Answers
I want to change the reference axis of an object relative to the camera of another object 0 Answers
GameObject not changing position in PlayMode although the Transform changes 1 Answer