Search Unity

GameObjects don't show up after build

Discussion in 'Editor & General Support' started by Tigro, Jun 11, 2019.

  1. Tigro

    Tigro

    Joined:
    Apr 25, 2014
    Posts:
    41
    I have one kinda-legacy (ie. 2 year old ;)) project on Unity 2017.3 which I wanted to finish up - it's a simple mobile game, not complete yet, but I stumbled upon a problem with a very basic functionality - at runtime, I generate some gameObjects (each of the orange tiles is a GO) that you can later click on. So the scene looks like this in play mode:



    And like this according to the Editor in 9:18 aspect ratio (correct scaling is not yet done so I am aware that it's not scaled properly ;)):



    Yet when you build it and run it on an actual 9:18 device like Huawei P20, it looks like this:



    All the GUI elements are rendered, they work, the logic for them is there (ie. you can pause/restart) but the tiles don't load at all. Why could it be so? This scene is really basic, no real dark magic here, just a bunch of gameObjects instantiated at runtime. Windows build works just fine, only the Android one is problematic.
     
  2. Tigro

    Tigro

    Joined:
    Apr 25, 2014
    Posts:
    41
    No ideas what may be the cause? :(
     
  3. Tigro

    Tigro

    Joined:
    Apr 25, 2014
    Posts:
    41
    I saw that for some people with similar problems upgrading to the newest version helped but in my case an upgrade to 2019.x breaks a lot of obsolete things that it turns out I'd been using so I'd rather not deal with all that right now. Isn't there a way to have it working still under 2017?
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    5,485
    I'd check the logs on the android device to see if there is some problem loading textures, or unexpected null reference errors, etc. Often if you get differing behavior between platforms like this you'll see some logged error to give you a hint what the issue is.
     
    Tigro likes this.
  5. Tigro

    Tigro

    Joined:
    Apr 25, 2014
    Posts:
    41
    thanks a lot! logcat revealed that was a problem with a file path loading a text file. Thanks a lot! :)
     
    Joe-Censored likes this.