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

GraphicRaycaster priority with multi-canvases on Unity 2019

Discussion in 'UGUI & TextMesh Pro' started by phuongnh, Jun 30, 2020.

  1. phuongnh

    phuongnh

    Joined:
    Sep 23, 2019
    Posts:
    22
    Hello,
    I have multi canvases for UIs on my game, which are nested in one main canvas.
    Every canvas has a GraphicRaycaster component attached.
    The problem is, the top canvas (which is created later) does not process my input, but the behind does (in the screenshot, the MessageUI does not receive input, but the FindMatchUI does).
    upload_2020-6-30_12-27-16.png
    If I disable the GraphicRaycaster of the behind canvas and enable it again, I will get the expected the behavior. I think the priority of GraphicRaycaster should follow the order of canvases right?

    This issue only happens on Unity 2019, it works fine on Unity 2018.
    Is this a bug of Unity 2019?
     
  2. phuongnh

    phuongnh

    Joined:
    Sep 23, 2019
    Posts:
    22
    Adding a GraphicRaycaster to main canvas will fix this problem.
    It seems related to updated logic in uGUI on Unity 2019.