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

質問編集履歴

8

変更

2015/12/11 08:07

投稿

cdecda
cdecda

スコア11

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

コードとエラー変更

2015/12/11 08:07

投稿

cdecda
cdecda

スコア11

title CHANGED
File without changes
body CHANGED
@@ -6,18 +6,15 @@
6
6
  ですがうまく動きません。
7
7
 
8
8
  ###発生している問題・エラーメッセージ
9
- error CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `UnityEngine.Transform'
9
+ error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)' has some invalid arguments
10
- error CS0029: Cannot implicitly convert type `UnityEngine.Vector3' to `UnityEngine.Transform'
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
- error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
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

ソースコードの編集

2015/12/11 08:05

投稿

cdecda
cdecda

スコア11

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
- Transform position; Object e; Object e2; Transform p;
27
+ Transform position;
28
+ Object enemy;
29
+ Object enemy2;
30
+ Transform plane;
28
- Transform sMarker; Transform eMarker; GameObject Target;
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
- isTriggeredpy = true; isTriggeredcp1 = true;
40
+ isTriggeredcp1 = true;
35
- p = Other.transform.gameObject;
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<cp1>().startMarker;
49
+ Transform sMarker = GetComponent<enemyjunkai>().startMarker;
44
- Transform eMarker = GetComponent<cp1> ().endMarker;
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("sg") = sMarker; p.transform.Find("sg1") = eMarker;
66
+ p.transform.Find("smallflat") = sMarker; p.transform.Find("smalflat1") = eMarker;
61
67
  }
62
68
  if (!isTriggeredpy) {
63
69
 

5

タグの編集

2015/11/27 10:04

投稿

cdecda
cdecda

スコア11

title CHANGED
File without changes
body CHANGED
File without changes

4

ソースコードの編集

2015/11/27 07:55

投稿

cdecda
cdecda

スコア11

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

ソースコードの編集

2015/11/27 07:02

投稿

cdecda
cdecda

スコア11

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 position; Object e; Object e2; Transform p; Transform sMarker; Transfor m eMarker; GameObject Target;
28
+ Transform sMarker; Transform eMarker; GameObject Target;
28
29
 
29
30
 
30
31
  void OnTriggerStay (Collider Other){

2

エラーメッセージの編集

2015/11/27 06:55

投稿

cdecda
cdecda

スコア11

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

エラーメッセージの編集

2015/11/27 06:50

投稿

cdecda
cdecda

スコア11

title CHANGED
File without changes
body CHANGED
@@ -6,19 +6,19 @@
6
6
  ですがうまく動きません。
7
7
 
8
8
  ###発生している問題・エラーメッセージ
9
- Assets/py.cs(15,17): error CS0029: Cannot implicitly convert type `string' to `bool'
9
+ error CS0029: Cannot implicitly convert type `string' to `bool'
10
- Assets/py.cs(16,70): error CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `UnityEngine.Transform'
10
+ error CS0029: Cannot implicitly convert type `UnityEngine.GameObject' to `UnityEngine.Transform'
11
- Assets/py.cs(16,102): error CS0029: Cannot implicitly convert type `UnityEngine.Vector3' to `UnityEngine.Transform'
11
+ error CS0029: Cannot implicitly convert type `UnityEngine.Vector3' to `UnityEngine.Transform'
12
- Assets/py.cs(24,27): warning CS0219: The variable `eMarker' is assigned but its value is never used
12
+ warning CS0219: The variable `eMarker' is assigned but its value is never used
13
- Assets/py.cs(23,27): warning CS0219: The variable `sMarker' is assigned but its value is never used
13
+ warning CS0219: The variable `sMarker' is assigned but its value is never used
14
- Assets/py.cs(40,37): 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
- Assets/py.cs(40,71): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
15
+ error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
16
- Assets/py.cs(44,40): error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
16
+ error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
17
- Assets/py.cs(44,25): error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
17
+ error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
18
- Assets/py.cs(44,25): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
18
+ error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
19
- Assets/py.cs(44,94): error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
19
+ error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected
20
- Assets/py.cs(44,80): error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
20
+ error CS1502: The best overloaded method match for `UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments
21
- Assets/py.cs(44,80): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
21
+ error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Vector3'
22
22
  ###ソースコード
23
23
  ```
24
24
  public class py : MonoBehaviour {