Question by
Palasys · Oct 05, 2020 at 11:40 AM ·
buttonmouse-drag
How to simulate mouse drag by a button !
Hey there, I want to simulate mouse drag by a button. I mean when I pressed the button I want it to change the mouse position to specified vector2(which is stored in a variable before) , then get mouseButtonDown , then move the mouse position to target vector2 (which is stored in a variable before) and detect the mouseButtonUp . A normal dragging process but by a button . I mention again that I want to click on a button and that button do this for me. If this is possible I would be really happy to see your solution.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613013146im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problem with Application.Quit 2 Answers
Creating dynamically moving buttons/GUI objects. 1 Answer
A doubt on loading Scenes 0 Answers