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

The OnScreenStick send Vector3 type may incorrect. #157

Closed
watsonsong opened this issue Jun 29, 2018 · 1 comment
Closed

The OnScreenStick send Vector3 type may incorrect. #157

watsonsong opened this issue Jun 29, 2018 · 1 comment
Labels
bug Issues where existsing functionality misbehaves
Milestone

Comments

@watsonsong
Copy link

I try to use the OnScreenStick to bind the UGUI joystick to gamepad with the control path: //LeftStick

But the SendValueToControl(newPos); send a Vector3 so the control cast in SendValueToControl will failed.
I change the SendValueToControl(newPos); into SendValueToControl(new Vector2(newPos.x, newPos.y)); to resolve this problem, but it seems not a right way to do this.

And there is another thing is OnScreenControl use OnEnable and OnDisable to add and remove a on screen device. But sometime, for example the joystick is disabled in normal time, enable only when the player touch it. So it could be better to change the OnEnable and OnDisable to Awake and OnDestroy.

@Rene-Damm Rene-Damm added the bug Issues where existsing functionality misbehaves label Jul 2, 2018
@Rene-Damm Rene-Damm added this to the 2018.2 milestone Jul 2, 2018
@Rene-Damm
Copy link
Contributor

Should be fixed in 15cc5b4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues where existsing functionality misbehaves
Projects
None yet
Development

No branches or pull requests

2 participants