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?