質問編集履歴
8
変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -7,12 +7,19 @@
|
|
7
7
|
|
8
8
|
###発生している問題・エラーメッセージ
|
9
9
|
error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments
|
10
|
+
|
10
11
|
error CS1503: Argument `#1' cannot convert `UnityEngine.Vector3' expression to type `float'
|
12
|
+
|
11
13
|
error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
|
14
|
+
|
12
15
|
error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
|
16
|
+
|
13
17
|
error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments
|
18
|
+
|
14
19
|
error CS1503: Argument `#1' cannot convert `UnityEngine.Vector3' expression to type `float'
|
20
|
+
|
15
21
|
error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
|
22
|
+
|
16
23
|
error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
|
17
24
|
|
18
25
|
###ソースコード
|
7
コードとエラー変更
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,18 +6,15 @@
|
|
6
6
|
ですがうまく動きません。
|
7
7
|
|
8
8
|
###発生している問題・エラーメッセージ
|
9
|
-
error
|
9
|
+
error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments
|
10
|
-
error
|
10
|
+
error CS1503: Argument `#1' cannot convert `UnityEngine.Vector3' expression to type `float'
|
11
|
-
warning CS0219: The variable `eMarker' is assigned but its value is never used
|
12
|
-
warning CS0219: The variable `sMarker' is assigned but its value is never used
|
13
|
-
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
|
14
|
-
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
|
15
|
-
error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
|
16
11
|
error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
|
17
12
|
error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
|
13
|
+
error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments
|
18
|
-
|
14
|
+
error CS1503: Argument `#1' cannot convert `UnityEngine.Vector3' expression to type `float'
|
19
15
|
error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
|
20
16
|
error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
|
17
|
+
|
21
18
|
###ソースコード
|
22
19
|
```
|
23
20
|
public class py : MonoBehaviour {
|
@@ -38,6 +35,8 @@
|
|
38
35
|
if (Other.tag == "E") {
|
39
36
|
isTriggeredpy = true;
|
40
37
|
isTriggeredcp1 = true;
|
38
|
+
Transform sMarker = GetComponent<enemyjunkai>().startMarker;
|
39
|
+
Transform eMarker = GetComponent<enemyjunkai> ().endMarker;
|
41
40
|
plane = Other.transform.gameObject;
|
42
41
|
position = Other.transform.position;
|
43
42
|
}
|
@@ -46,8 +45,6 @@
|
|
46
45
|
|
47
46
|
// Use this for initialization
|
48
47
|
void Start () {
|
49
|
-
Transform sMarker = GetComponent<enemyjunkai>().startMarker;
|
50
|
-
Transform eMarker = GetComponent<enemyjunkai> ().endMarker;
|
51
48
|
|
52
49
|
foreach (Transform child in transform)
|
53
50
|
{
|
@@ -67,7 +64,7 @@
|
|
67
64
|
}
|
68
65
|
if (!isTriggeredpy) {
|
69
66
|
|
70
|
-
Instantiate(e2,Vector3(position),Quaternion.identity); Instantiate(e,Vector3(position),Quaternion.identity);
|
67
|
+
Instantiate(e2,new Vector3(position,position,position),Quaternion.identity); Instantiate(e,new Vector3(position,positon,position,),Quaternion.identity);
|
71
68
|
}
|
72
69
|
}
|
73
70
|
}
|
6
ソースコードの編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,16 +23,22 @@
|
|
23
23
|
public class py : MonoBehaviour {
|
24
24
|
|
25
25
|
private bool isTriggeredcp1;
|
26
|
-
private bool isTriggeredpy;
|
26
|
+
private bool isTriggeredpy;
|
27
|
-
|
27
|
+
Transform position;
|
28
|
+
Object enemy;
|
29
|
+
Object enemy2;
|
30
|
+
Transform plane;
|
28
|
-
|
31
|
+
Transform sMarker;
|
32
|
+
Transform eMarker;
|
33
|
+
GameObject Target;
|
29
34
|
|
30
35
|
|
31
36
|
void OnTriggerStay (Collider Other){
|
32
37
|
|
33
38
|
if (Other.tag == "E") {
|
39
|
+
isTriggeredpy = true;
|
34
|
-
|
40
|
+
isTriggeredcp1 = true;
|
35
|
-
|
41
|
+
plane = Other.transform.gameObject;
|
36
42
|
position = Other.transform.position;
|
37
43
|
}
|
38
44
|
}
|
@@ -40,8 +46,8 @@
|
|
40
46
|
|
41
47
|
// Use this for initialization
|
42
48
|
void Start () {
|
43
|
-
Transform sMarker = GetComponent<
|
49
|
+
Transform sMarker = GetComponent<enemyjunkai>().startMarker;
|
44
|
-
Transform eMarker = GetComponent<
|
50
|
+
Transform eMarker = GetComponent<enemyjunkai> ().endMarker;
|
45
51
|
|
46
52
|
foreach (Transform child in transform)
|
47
53
|
{
|
@@ -57,7 +63,7 @@
|
|
57
63
|
|
58
64
|
if (!isTriggeredcp1) {
|
59
65
|
|
60
|
-
p.transform.Find("
|
66
|
+
p.transform.Find("smallflat") = sMarker; p.transform.Find("smalflat1") = eMarker;
|
61
67
|
}
|
62
68
|
if (!isTriggeredpy) {
|
63
69
|
|
5
タグの編集
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
4
ソースコードの編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
void OnTriggerStay (Collider Other){
|
32
32
|
|
33
|
-
if (Other.tag = "E") {
|
33
|
+
if (Other.tag == "E") {
|
34
34
|
isTriggeredpy = true; isTriggeredcp1 = true;
|
35
35
|
p = Other.transform.gameObject;
|
36
36
|
position = Other.transform.position;
|
3
ソースコードの編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -24,7 +24,8 @@
|
|
24
24
|
|
25
25
|
private bool isTriggeredcp1;
|
26
26
|
private bool isTriggeredpy;
|
27
|
+
Transform position; Object e; Object e2; Transform p;
|
27
|
-
Transform
|
28
|
+
Transform sMarker; Transform eMarker; GameObject Target;
|
28
29
|
|
29
30
|
|
30
31
|
void OnTriggerStay (Collider Other){
|
2
エラーメッセージの編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,7 +6,6 @@
|
|
6
6
|
ですがうまく動きません。
|
7
7
|
|
8
8
|
###発生している問題・エラーメッセージ
|
9
|
-
error CS0029: Cannot implicitly convert type `string' to `bool'
|
10
9
|
error CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `UnityEngine.Transform'
|
11
10
|
error CS0029: Cannot implicitly convert type `UnityEngine.Vector3' to `UnityEngine.Transform'
|
12
11
|
warning CS0219: The variable `eMarker' is assigned but its value is never used
|
1
エラーメッセージの編集
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,19 +6,19 @@
|
|
6
6
|
ですがうまく動きません。
|
7
7
|
|
8
8
|
###発生している問題・エラーメッセージ
|
9
|
-
|
9
|
+
error CS0029: Cannot implicitly convert type `string' to `bool'
|
10
|
-
|
10
|
+
error CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `UnityEngine.Transform'
|
11
|
-
|
11
|
+
error CS0029: Cannot implicitly convert type `UnityEngine.Vector3' to `UnityEngine.Transform'
|
12
|
-
|
12
|
+
warning CS0219: The variable `eMarker' is assigned but its value is never used
|
13
|
-
|
13
|
+
warning CS0219: The variable `sMarker' is assigned but its value is never used
|
14
|
-
|
14
|
+
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
|
15
|
-
|
15
|
+
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
|
16
|
-
|
16
|
+
error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
|
17
|
-
|
17
|
+
error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
|
18
|
-
|
18
|
+
error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
|
19
|
-
|
19
|
+
error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
|
20
|
-
|
20
|
+
error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
|
21
|
-
|
21
|
+
error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
|
22
22
|
###ソースコード
|
23
23
|
```
|
24
24
|
public class py : MonoBehaviour {
|