[SOLVED] Input issue at runtime

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?

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!