Stuck trying to start a dynamic game mode UI in UI Toolkit

Hi, I’m new to Unity and C#, so I may just be missing something obvious.

My end goal is to have a web app which displays a 3d bundle of parts that the user can select from a pop over screen. These parts will be selected from options which the app will query from a web service.

This means everything needs to be dynamic. I’ll need Lists of objects and to iterate through them and add items onto the screen. I also want to support mobile and desktop resolutions from the same code base.

My research seems to show that UI Toolkit is the way to do this… but everything I find seems to be showing throwing up UXML screens that were built in the UI Builder, and it all seems to be geared towards editor mode.

Can anyone point to some resources, with either a tutorial or a sample project that shows labels, text boxes, etc being added from code with no UXML involved and not in Editor mode?

Thanks
F_C

Was able to get it working by changing the hierarchy after following the notes here

In short the empty GameObject should have:
a script (your c# class that extends MonoBehavior and has the onEnable function)
a UI Document - hooked up to Panel Settings and UXML page
an Event System

I guess the way it was written elsewhere was very confusing to me, as I was adding UI Documents to the hierarchy nested under the GameObject.