• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Brudri · Jun 15, 2017 at 08:26 AM · error messagelinerendererunity 5.2

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

enter code herealt text 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<LineRenderer> ();

     List<Vector3> posiciones = new List<Vector3>();

     while (Input.GetMouseButton(0))
     {
         posiciones.Add(Camera.main.ScreenToWorldPoint(Input.mousePosition));

         r.SetVertexCount(posiciones.Count);

         r.SetPosition(posiciones.ToArray());



         yield return new WaitForSeconds(0);
 
     }
 }

}

script.png (66.4 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

106 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mismatched Serialization Error in Unity 5.2.1f1 0 Answers

Error when building game 1 Answer

NullReferenceException: Object reference not set to an instance of an object InputEnabler.Enable () (at Assets/scripts/InputEnabler.cs:26) Inventory.Update () (at Assets/scripts/Inventory.cs:30) 1 Answer

hi, please, I'm trying to create an enemy detection script in cs and i keep getting errors (83,36) (85,78) CS1519, (73,46) CS1525, (89,27) CS8025 parsing error, please help 1 Answer

Help me please i am stuck. 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges