Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Android Build different than Unity Editor and Unity Remote

Discussion in 'Android' started by cscox2191, Mar 14, 2019.

  1. cscox2191

    cscox2191

    Joined:
    Feb 8, 2018
    Posts:
    58
    Hello,

    I have a 2D game that i have been testing with Unity Remote 5 and even building out to my Android phone to test. According to my game view and camera, everything looks fine. When i use the Unity Remote app, the game looks like it should according to the editor. But...When I build it out as an .apk file and install it on my phone, the view looks different. Some of the touch controls are slightly off, but noticeably. The left and right edges are further out than I want, meaning i see less of the screen than I should. I use anchors for the buttons and have the canvas set to Scale to Screen Size.

    Any tips or ideas? The strangest thing to me is that the Unity Remote shows it looking fine but then building it out makes it all wonky. Let me know if more details are needed.

    Thanks friends!
     
  2. JuliusM

    JuliusM

    Unity Technologies

    Joined:
    Apr 17, 2013
    Posts:
    320
    Unity remote works by taking a screenshot of what is shown in the editor, uploading it to the device and stretching it to the phone resolution. The purpose of the remote is to provide mobile input to a project running in the editor (for testing purposes). If you really want to use remote to approximate the UI layout, make sure that the game window in editor has the same aspect ratio as your device.
     
    cscox2191 likes this.