Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Unity URP 2D Point Lights not working on certain android devices

Discussion in 'Universal Render Pipeline' started by GiomGots, Aug 20, 2023.

  1. GiomGots

    GiomGots

    Joined:
    Apr 3, 2021
    Posts:
    13
    Hello everyone,

    I created a scene in which there's a day/night cycle. It runs fine on every android device that's been tested so far, but not on honor 6x.
    See expected and what i've got in attached files.
    I really don't know what to do, UI renders fine and non-lit sprites render fine.
    Additionnally, Light 2D set to "Sprite" works.
    I've got no error messages and i don't have access to the device to run big tests.
    Any help would be really appreciated!

    Thanks for your help!
     

    Attached Files:

  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Any errors in logcat?
    Did you try OpenGLES3?
    Which Unity version?
     
  3. GiomGots

    GiomGots

    Joined:
    Apr 3, 2021
    Posts:
    13
    Thanks for your reply,
    No errors in logcat (I didn't get any report from the user and there's a ui button (thus visible for him) that pops whenever an error is caught
    The graphics API was in "auto" mode, but when i unticked the setting, i got this:
    upload_2023-8-22_10-4-11.png

    I am under Unity 2021.0.6f1
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    1. Update to the latest 2021 LTS, there have been fixes.
    2. Remove vulkan from the list and try again
    3. Logcat logs more than just errors. Also warnings and regular logs. I suggest to check it
     
  5. GiomGots

    GiomGots

    Joined:
    Apr 3, 2021
    Posts:
    13
    Thanks for your insights!
    I was reluctant to update Unity because i once got errors after updating, but i guess since I stay on 2021 it should be fine?
    Removing vulkan won't deteriorate QoL of higher end mobiles ?
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    2021.0.6f1 is not a unity version, so I cannot say for sure.
    But usually updates withing the same yearly release go alright.

    And unless you use VFX graph or very heavy compute shaders, OpenGLES3 is better for mobile games on the broad scale. Vulkan might a slight improvement in performance on the latest and greatest devices, but I usually suggest to use OpenGLES3 for android games
     
  7. GiomGots

    GiomGots

    Joined:
    Apr 3, 2021
    Posts:
    13
    Sorry, I am on 2021.3.6f1
    I tried both upgrading unity and disabling Vulkan (letting only OpenGLES3) at the same time, but the issue persists...
    It's really weird tho, it only does it for one device, is it theorically possible that a device couldn't run 2D point lights ?
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    The docs say there is no extra required compatibility.
    So update to the latest 2021lts and if that doesn't work I still highly recommend checking logs at startup etc
     
  9. GiomGots

    GiomGots

    Joined:
    Apr 3, 2021
    Posts:
    13
    I got logs back -every log- and i couldn't find anything interesting.

    I got some

    Code (CSharp):
    1. A scripted object (script unknown or not yet loaded) has a different serialization layout when loading. (Read 48 bytes but expected 68 bytes)
    2. Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts?
    and

    Code (CSharp):
    1. The referenced script on this Behaviour (Game Object '<null>') is missing!
    Code (CSharp):
    1. The referenced script (Unknown) on this Behaviour is missing!
    But that's messages i also get from other builds that are totally fine with the lights...

    Here are some informations about the device

    HONOR VNE-LX1 HONOR X6 Handheld fd27f3d8e9f4a2b9de73b9a00f9fa1e5
    Android OS 12 / API-31 (HONORVNE-L41CM/6.1.0.232C431E1R3P2), FR, 3797, 8x ARM64 FP ASIMD AES
    720x1550 320dpi, PowerVR Rogue GE8320, Imagination Technologies vmem: 1024 Max Texture: 8192
     
  10. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Is there a chance you are using too much memory? How much memory is in use by the game?

    I'm beginning to think it's just a device with S***ty drivers