UI Toolkit Document is rendered pink on some android devices

Hi everyone.
I’ve got an issue in my live game that I’m struggling to solve for a long time now.
some players complained that the game “does not display graphics” and that the whole screen is pink.
for a long time I was not able to reproduce this issue until a few days ago, with a very specific emulator configuration.

In my game, 90% of the UI is using UI Toolkit, and we have a few systems that use the old UI system with a canvas. Thanks to that, i noticed that the issue comes from UI Toolkit, and when I disable the main UI document, the game renders fine.

I manage to reproduce this behavior on a fresh project, that have just 2 scenes:

  • Scene 1 - a canvas with 1 button that will navigate to scene 2
  • Scene 2 - a UI document with 1 visual element as the background and 1 text label.

scene 1 is rendered fine, and as soon as I navigate to scene 2, the whole screen is pink.

In android studio i can see the following errors when scene 2 is loaded:

eglGetConfigAttrib: Unsupported attribute 1/GL_LINES
eglGetConfigAttrib: Unsupported attribute EGL_DEPTH_ENCODING_NV
eglGetConfigAttrib: Not Implemented: attribute EGL_NATIVE_VISUAL_TYPE
eglGetConfigAttrib: Not Implemented: attribute EGL_MIN_SWAP_INTERVAL

I know that when something is rendered as pink it’s related to some issue with materials or shaders, but since the issue comes from UI Toolkit I’m kind of lost. (I tried almost any fix attempt I could find online)

If anyone encountered a similar issue or have an idea what could be the issue I’ll be grateful.

Screenshots:


1 Like

Hi, dorcohendev! Since you mentioned that you’re able to reproduce the issue on a fresh project, could you please report a bug via the Bug Reporter (“Help → Report a Bug…” in the Unity Editor)? Make sure to attach the mentioned project. Cheers!

Do you have this issue only on specific devices, or every device?

And yes, reporting a bug with your test scene will help a ton.

Thanks for the reply.
Only on some devices. on most devices everything works fine.
and np, I’ll open a bug report.

Thanks for the reply.
sure thing, I’ll open a bug report and put as much data as possible.

Hi @dorcohendev and @mcoted3d! May I ask if this issue has been fixed? I tried looking for it in the Unity Issue Tracker but couldn’t find anything. I also searched for other posts, but this seems to be the only one discussing this bug/issue.

Our game uses Unity 6000.2.6f2, and recently some players have reached out saying they’re encountering the same problem (UI Toolkit rendering purple) on certain Android devices (LG K22) and on emulators (BlueStacks).

Definitely worth filing a bug then. Thank you!

1 Like

I submitted a bug report back in the day and was in contact with the guy from Unity about trying to reproduce it. since they managed to reproduce it only on an emulator and not on a physical device, the bug was closed since Unity does not have an official support for emulators.

1 Like

This is happening to us also.

Did you create a Unity bug ticket I can attach this info to?
Is there any resolution to this?

For us it happens on Lenovo TB-X104F (LenovoTB-X104F_EEA)

Operating System: Android OS 8.1.0 / API-27 (OPM1.171019.026/TB-X104F_S000053_221021_ROW)

Device info:
ro.product.manufacturer : LENOVO
ro.product.brand : Lenovo
ro.product.model : Lenovo TB-X104F
ro.product.name :
ro.product.device : X104F
ro.product.cpu.abi : armeabi-v7a
ro.soc.manufacturer :
ro.soc.model :
ro.arch :
ro.hardware : qcom
ro.hardware.chipname :
ro.board.platform : msm8909
ro.build.changelist :
ro.build.description : hq_msm8909-user 8.1.0 OPM1.171019.026 56 release-keys
ro.build.date : Fri Oct 21 16:52:12 CST 2022