Search Unity

Bug [SOLVED] Input issue at runtime

Discussion in 'UI Toolkit' started by GuillaumeLeplang, Jan 9, 2020.

  1. GuillaumeLeplang

    GuillaumeLeplang

    Joined:
    Sep 3, 2019
    Posts:
    8
    Hi!

    I was trying to test some dynamic add/remove uxml at runtime in the Panel Renderer, but in one case, buttons are not responding anymore.

    Working scenario :
    • Create a prefab containing a PanelRenderer/PanelScaler/UIElementsEventSystem
    • Set a UXML containing a button in the PanelRenderer
    • Instantiate the prefab at runtime
    Not working scenario :
    • Create a prefab containing a PanelRenderer/PanelScaler/UIElementsEventSystem
    • Set a UXML containing some VisualElements (as layers for example)
    • Instantiate the prefab at runtime
    • Clone the UXML containing a button in one of those VisualElements
    Am I doing something wrong? Did I miss a step somewhere?
     
    Last edited: Jan 10, 2020
  2. GuillaumeLeplang

    GuillaumeLeplang

    Joined:
    Sep 3, 2019
    Posts:
    8
    After some tests, it appears that I had an empty VisualElement on top of my button, with its PickingMode value at Position, so it was blocking my inputs...

    I will need to implements a custom focus system to manage this value on my containers!