unity始めたばかりです。スロットを作っています。 Assets\program\leftri.cs(22,43): error CS0029: Cannot implicitly convert type '(int, int, int)' to 'UnityEngine.Vector3'
unity始めたばかりです。スロットを作っています。 Assets\program\leftri.cs(22,43): error CS0029: Cannot implicitly convert type '(int, int, int)' to 'UnityEngine.Vector3' というエラーが出てしまいます。有識者の方直し方を教えてください。 以下コード using System.Collections; using System.Collections.Generic; using UnityEngine; public class leftri : MonoBehaviour { // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { //レバーオン if (Input.GetKey(KeyCode.Space)) { this.transform.Translate(0,-187,0); if (this.transform.position.y < -3260) { this.transform.position = (-730,2350,1); } } //停止 if (Input.GetKey(KeyCode.LeftArrow)) { GetComponent<leftri>().enabled = false; } } }
ベストアンサー
this.transform.position = (-730,2350,1); ↓ this.transform.position = new Vector3(-730,2350,1);
質問者からのお礼コメント
解決しました。ありがとうございました。
お礼日時:2/25 17:39