Hi, I’m trying to instantiate a uxml template and display it in a box at runtime, but it is invisible.
Here’s what I mean:
The element is visible in the debug layout viewer, but not rendering in the ui itself.
For reference, it should look something like this:
I’ve reduced the problem to a simple black frame, and the problem persists.
var elem = new VisualElement();
elem.style.backgroundColor = new StyleColor(new Color(0, 0, 0, 1));
Content.Add(elem);
Content refers to the white container box. This code gets ran, I know that (in the case of when I was using the template) OnAttachToPanel is being fired, it is just not visible. I’m totally lost… any ideas?