Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to perform drag and drop? #69

Closed
archanapura opened this issue Mar 3, 2020 · 3 comments
Closed

How to perform drag and drop? #69

archanapura opened this issue Mar 3, 2020 · 3 comments

Comments

@archanapura
Copy link

Is it possible to perform drag and drop ?what is command to achieve it?

@gwaredd
Copy link
Owner

gwaredd commented Mar 3, 2020

There's a "simulate" component that can simulate click and drag using the unity UI event system. This may work for you or can be modified to your needs. See page 27 of the pdf

@gwaredd gwaredd closed this as completed Mar 3, 2020
@archanapura
Copy link
Author

Thanks Gwaredd.
I tried with /q/simulate.click(20,600) and was not able to click on element. I was using transform position for x and y.What value should we give for x and y?
Same thing in drag and drop.What value should we give for x and y?

@gwaredd
Copy link
Owner

gwaredd commented Mar 4, 2020

Coordinates are in screen space.

The result is a EventSystem.current.RaycastAll into the scene so the underlying objects need to handle that.

Unium is a query based approach so really stateful ui is outside of the design. You could always write your own handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants