- Home /
hii,i need to draw a line on mouse click in unity. Can you please suggest me how to do it..?
We need more than that to provide you with a proper reply. $$anonymous$$indly share details as to how you need to draw line and all the stuff.
If you have tried something like a script then provide that too.
For start, read this: LineRenderer.
Answer by Srki94 · Oct 13, 2014 at 09:30 AM
You have couple of options, there is already tons of answered questions for this though so I would suggest that you look into some of them :
http://answers.unity3d.com/questions/599761/how-can-i-draw-a-line-in-unity-with-mouse-.html http://answers.unity3d.com/questions/758051/draw-line-from-one-point-to-another-using-mouse.html
You can also check : http://wiki.unity3d.com/index.php?title=DrawLine
Also you didn't write is this for debugging or game view. If it's for the first you can also use
Debug.DrawLine
http://docs.unity3d.com/ScriptReference/Debug.DrawLine.html
Small tip, Use title for short explanation of what you need done and body of the question to explain what you actually want in detail :)
I hope this helped.
Thank you very much...
Yes it did work...And i got your point.
:)
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
How To Get The Image From Atlas At Run Time 0 Answers
Checking camera distance between object in a AR game 1 Answer
Input problems 2 Answers