- Home /
Analogue OnMouseUp for iOS(Unity iPhone)
Hello. I have a question. When I work in Unity Mac, I use the script:
var isBtn = false;
function OnMouseUp() { if(isBtn) { Application.LoadLevel(1); } }
But this script does not work on iOS. I tried using:
function Update() { var count = Input.touchCount; for (var i: int = 0; i < count; i++) { var touch : Touch = Input.GetTouch(i); Application.LoadLevel(1);
} }
But it starts Application.LoadLevel (1) when you click on any part of the screen.
Tell me please how to convert my Mac script to make it work in iOS.
Your answer
![](https://koobas.hobune.stream/wayback/20220613053559im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
translating a touchDeltaPosition from the y axis to z axis 1 Answer
Touches don't respond correct 2 Answers
Detecting Click/Touch in Unity iPhone (SpriteManager) 1 Answer
Taping in UnityIphone. URGENT! 2 Answers
A node in a childnode? 1 Answer