Hi,
We've received a couple requests by our users to have bluetooth mouse support added to our Android products. I looked into this and tried to hack a solution for it but not really happy with it. The problem of course is that if you process both mouse and touch support the input will be registered twice. So my thought is to not explicitly set the mouse boolean in the Awake() and in the update have a special case that handle mouse input if there hasn't been any touch input if both are enabled.
All Line Numbers are original line numbers of the CS not the line numbers after modification
UICamera.cs Line 687
if (Application.platform == RuntimePlatform.Android ||
Application.platform == RuntimePlatform.IPhonePlayer)
{
useTouch = true;
if (Application.platform == RuntimePlatform.IPhonePlayer)
{
useMouse = false;
useKeyboard = false;
useController = false;
}
}
UICamera.cs 760.cs
// Process touch input
if (useTouch) ProcessTouches();
// Update mouse input
if ((useMouse && !useTouch) || (useTouch && mIsEditor) || (useTouch && useMouse && mTouches.Count <= 0)) ProcessMouse();
Does have a more elegant solution (not adding a lot of work every time I update) to get mouse support working on Android with NGUI?