TemplateContainer crashes UI layout

I’m creating different templates/prefabs for repetitive elements in the interface. However, the parent that is created for the element on which the template is applied breaks the layout in terms of the element’s size in the interface, and I have to manually assign values or use an additional selector for this TemplateContainer. This is very disruptive, whether elements are spawned manually or from code. Are there any plans to address this issue with the troublesome TemplateContainer? Either by completely removing it (so that the main element remains as in the case of prefabs) or by making it always inherit from its child.

Hi tomashined! There are currently no plans to change the TemplateContainer paradigm. We are however aware of such possibilities and the subject has been discussed in some details in the past. There are positives and negatives, and for now this is not a part of UI Toolkit that we want to be changing while we are working on other features that could be negatively impacted by it. Do feel free to contribute to any active discussion on the subject, however, you have some supporters amongst our ranks :slight_smile: