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. Dismiss Notice

Bug Weird Artifact with TextMeshPro Button

Discussion in 'UGUI & TextMesh Pro' started by mzarnowski, Aug 3, 2023.

  1. mzarnowski

    mzarnowski

    Joined:
    Jul 11, 2023
    Posts:
    2
    Hi! I am trying to build a simple UI overlay, but when placing them inside a canvas, I get a weird artifact... sometimes. It happens upon camera movement, or mouse movement nearby the UI buttons.

    Sorry for the vague description, but I don't even have an idea how to correctly call it.

    A few times, when removing the button, te artifact "jumped" to the other button.

    I am using Linux for development, Unity version is 2022.3.4f1
    artifact.png

    What could be the possible issue?
     

    Attached Files:

  2. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    530
    Just to be sure everyone we are on the same page are you referring or to the white spike coming out of top button or is that just a speech bubble style thing?

    Following assume you are talking about the white spike coming out of top triangle.

    Are you sure the the issue is from textmesh pro and not the image used for button in background. TextmeshPro button is just a convenience function for creating regular button+ textmesh pro text on top but those are two separate objects. Shouldn't be hard to test this and somewhat narrow down the problem.

    Are you using the OpenGL or Vulkan mode?

    I have seen similar visual artifacts for 9 sliced UGUI images when using the editor on Linux in OpenGL mode. Also the problem seemed to disappear if I start unity with GALLIUM_THREAD=0 environment variable set. Which suggested that problem is either in the GPU driver code or the way Unity uses openGL API. Neither of which is something I can do anything about beside making a bug report. But since I had two workarkounds and I couldn't be bothered to reproduce it in an officially supported environement, I didn't further pursue that approach. That was roughly half a year ago and using 2021 series Unity, haven't retested whether the problem disappear.

    If your setup doesn't match those things it's probably a different problem.

    If you are on a officially supported setup (Ubuntu 18.04 or 20.04 see https://docs.unity3d.com/Manual/system-requirements.html for more details) go make a bugreport. Seems like you already have a close to minimal testcase for reproducing the problem and it happens sufficiently often.
     
  3. mzarnowski

    mzarnowski

    Joined:
    Jul 11, 2023
    Posts:
    2
    Yup, exactly

    Changing the Source Image from the default UISprite makes the artifact disappear, so that might be the issue.

    I was using OpenGL. After switching to Vulkan, the artifact disappears, which is much better solution for me, thanks for hinting at that!