- Home /
 
Why does my app function correctly in Unity Remote but not compiled as an app?
Hello forum heroes,
I am developing a 2D app in which the player can pan the camera in the play field. Following code works correctly when I tested it in Unity Remote but when the app was compiled the camera movement seems to lag behind.
     void Update() {
         if (Input.touchCount == 1 && Field.objectSelected == false && Input.GetTouch(0).phase == TouchPhase.Moved) {
             Vector2 fieldSize = fieldSizeOnScreen();
             Vector2 touchDeltaPosition = Input.GetTouch (0).deltaPosition;
             transform.Translate ((-touchDeltaPosition.x * fieldSize.x)/Screen.width, (-touchDeltaPosition.y * fieldSize.x)/Screen.height, 0);
             Field.Panning = true;
         } else {
             Field.Panning = false;
         }
     }
 
               In my game I am testing if the finger touches a 2D collider. Does this influence anything? Is this because the resources on the phone are limited is there a reason I don't know about? What can I do to prevent this?
Thanks in advance, Max
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Placing a Rect and detecting a Touch/Tap 1 Answer
Camera swipe AND gameObject touch (Android) 1 Answer
Clamp To The Screen Edge 0 Answers
2D Camera (Android, Iphone) 1 Answer
Timer Freeze Problem 1 Answer