teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

修正

2020/03/28 00:56

投稿

manmanJ
manmanJ

スコア19

title CHANGED
File without changes
body CHANGED
@@ -18,7 +18,7 @@
18
18
  {
19
19
  if(transform.GetChild(x).gameObject.activeSelf==true);
20
20
  {
21
- Debug.Log (""+transform.GetChild(a).gameObject.activeSelf+""+a);
21
+ Debug.Log (""+transform.GetChild(x).gameObject.activeSelf+""+x);
22
22
  transform.GetChild(0).gameObject.SetActive (false);
23
23
  }
24
24
  }

1

デバッグ処理の追加

2020/03/28 00:55

投稿

manmanJ
manmanJ

スコア19

title CHANGED
File without changes
body CHANGED
@@ -18,11 +18,14 @@
18
18
  {
19
19
  if(transform.GetChild(x).gameObject.activeSelf==true);
20
20
  {
21
+ Debug.Log (""+transform.GetChild(a).gameObject.activeSelf+""+a);
21
22
  transform.GetChild(0).gameObject.SetActive (false);
22
23
  }
23
24
  }
24
25
  }
25
26
  }
26
27
  ```
27
- 二番目以降がなくても非表示になってしまいます
28
+ 二番目以降がすべ非表示て1番目が非表示になってしまいます
29
+ デバッグにも1~15までfalseになっています
30
+ if(transform.GetChild(x).gameObject.activeSelf==true);
28
- 教えくださ
31
+ の部分をすり抜けしまってます