Search Unity

Android Build different than Unity Editor and Unity Remote

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

  1. Cornysam

    Cornysam

    Joined:
    Feb 8, 2018
    Posts:
    1,463
    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:
    835
    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.
     
    Cornysam likes this.
  3. xwizard707

    xwizard707

    Joined:
    May 26, 2019
    Posts:
    3
    I have the same issue.... I can play the game on unity remote, but when I build and run my app on the device I just see empty screen...
     
  4. Aminur

    Aminur

    Joined:
    Dec 1, 2020
    Posts:
    2
    empty screen? you're probably missing out on scene index. go to build settings, and make sure you put scenes in the build index. without scenes you'll only build APK that has a black skybox