You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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);
intoSendValueToControl(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.
The text was updated successfully, but these errors were encountered: