質問編集履歴

1

修正

2018/10/17 23:17

投稿

hayasaka
hayasaka

スコア13

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,35 @@
12
12
 
13
13
  ### 該当のソースコード
14
14
 
15
+ public Animator animator;
16
+
17
+ public GameObject Enemybody;
18
+
19
+ void VoidEnemyAttack ()
20
+
21
+ {
22
+
15
- animator.SetBool("attack", true);
23
+ animator10.SetBool("attack", true);
24
+
25
+ }
26
+
27
+
28
+
29
+ public void Generation() {
30
+
31
+
32
+
33
+ var parent = this.transform;
34
+
35
+ Instantiate(Enemybody, new Vector3(Enemy.transform.position.x, 0.5f, 0f), Quaternion.identity, parent).GetComponent<Animator>();
36
+
37
+ this.transform.Rotate(0.0f, -90.0f, 2.0f);
38
+
39
+ }
40
+
41
+
42
+
43
+
16
44
 
17
45
  ```ここに言語名を入力
18
46
 
@@ -23,3 +51,17 @@
23
51
  ### 試したこと
24
52
 
25
53
  生成する前のAssetを親のスクリプトに貼り付けてみました。
54
+
55
+
56
+
57
+ ヒエラルキー構造
58
+
59
+ 親がEnemyでその子にEnemyのGameObjectにプロジェクトから貼り付けたものをInstantiateしました。
60
+
61
+
62
+
63
+ 親のanimatorにはControllerとアバターも取得出来ておりません。
64
+
65
+
66
+
67
+ エラーは出ておりません。