Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Broken view via some android devices

Discussion in 'Editor & General Support' started by Mayo-san, Jun 12, 2019.

  1. Mayo-san

    Mayo-san

    Joined:
    Oct 20, 2015
    Posts:
    2
    the thing is i use LG G6
    and while i was testing my game it was working fine,
    but when i send it to a friend he had those issues,
    i tried another phone via usb debugging or plain sent the apk
    and i got the same problems as my friend

    tried to change texture compration,
    dissabled/ enabled 32 bit

    i even made the scene's blank without any gameobject active,
    but nothing still broken,
    next ill try to just make a new blank project and copy paste
    all the assets in there and check out if it would still continue.

    if anyone got a fix to this issue ill be glad.
     

    Attached Files:

  2. Mayo-san

    Mayo-san

    Joined:
    Oct 20, 2015
    Posts:
    2
    i fixed my own issue, ill still leave the post because who knows maybe someone would do the same silly mistake as me,

    so as it was kinda obvious the problem was with the camera,
    i wanted to scale my camera perspective relative to the screen width (on android).


    float r = Screen.width / 1440;
    cam.orthographicSize = 14 * r;

    that was my Bug,
    as you can notice really simple
    my phone lg G6 has width of 1440.
    so the value is 1, and the game works fine,
    yet it is casted to int so any phone with lower resolution get cam.size set to 0
    with leads to this sort of bug.