var touch : iPhoneTouch = iPhoneInput.GetTouch(i);
I got this error message:
Assets/Scripts/Joystick.js(13,55): BCW0012: WARNING: ‘UnityEngine.iPhoneInput.GetTouch(int)’ is obsolete. GetTouch method is deprecated. Please use Input.GetTouch instead.
So I can see that iPhoneInput.GetTouch is obsolete, but I do not want to use Input.GetTouch… which is not iPhone touch if I understood it.
Anyway… I do not want to guess… where can I find all the methods and variables that are defined by the game engine ?
Assets/Scripts/Joystick.js(13,57): BCE0022: Cannot convert ‘UnityEngine.Touch’ to ‘UnityEngine.iPhoneTouch’.
So I change it like this but I am guessing I have no idea … :
var touch : Touch = Input.GetTouch(i);
So now I do not have any errors but nither my iPhone respond to the touch… sdk 4.1
function update()
{
var count = Input.touchCount;
for (var i : int =0;i < count;i++)
{
var touch : Touch = Input.GetTouch(i);
if (gui.HitTest(touch.position))
{
gui.pixelInset.x = touch.position.x;
gui.pixelInset.y = touch.position.y;
}
}
}