Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

error CS1501 no overload for method 'SetPosition' takes '1' argument, Unity Version 5.2

$
0
0
`enter code here`![alt text][1] using UnityEngine; using System.Collections; using System.Collections.Generic; public class Dibujar : MonoBehaviour { // Update is called once per frame void Update () { if (Input.GetMouseButtonDown(0)) { StartCoroutine(dibujar()); } } IEnumerator dibujar() { LineRenderer r = new GameObject ().AddComponent (); List posiciones = new List(); while (Input.GetMouseButton(0)) { posiciones.Add(Camera.main.ScreenToWorldPoint(Input.mousePosition)); r.SetVertexCount(posiciones.Count); r.SetPosition(posiciones.ToArray()); yield return new WaitForSeconds(0); } } } [1]: /storage/temp/95964-script.png

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>