回答編集履歴

1

編集

2021/04/03 15:29

投稿

tsuki01
tsuki01

スコア1751

test CHANGED
@@ -9,6 +9,8 @@
9
9
  「.GetComponent<GameObject>()」の部分は不要です。
10
10
 
11
11
  「GameObject.Find("Center")」の部分が、GameObjectを返してくれるので。
12
+
13
+
12
14
 
13
15
 
14
16
 
@@ -25,6 +27,16 @@
25
27
  2、「if (Sphere == true)」だと正常にActive判定できないと思われます。
26
28
 
27
29
   「activeSelf」という、オブジェクトの状態を返してくれるプロパティがあるので、こちらを利用してはいかがでしょうか。
30
+
31
+
32
+
33
+ **参考URL**
34
+
35
+ - [Unityドキュメント / GameObject.Find](https://docs.unity3d.com/ja/current/ScriptReference/GameObject.Find.html)
36
+
37
+ - [Unityドキュメント / Transform.Find](https://docs.unity3d.com/ja/current/ScriptReference/Transform.Find.html)
38
+
39
+ - [Unityドキュメント / GameObject-activeSelf](https://docs.unity3d.com/ja/2018.4/ScriptReference/GameObject-activeSelf.html)
28
40
 
29
41
 
30
42