I am not sure how to go about inserting a PopupField in a specific location if it doesn’t support uxml. I have my current layout all create initially by the UIBuilder and once I had the basics of it sketched out I just saved and started work with the uxml document and the editor file.
I had put 4 enum dropdowns but realized one of the fields was best off being a list, but I want it in the 3rd spot of the 4
How might I get it to layout simialr to this below -
EnumField
EnumField
PopupField
EnumField
- if I am using the setup that is generated via the Create menu such as below?
public void OnEnable()
{
// Each editor window contains a root VisualElement object
VisualElement root = rootVisualElement;
var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/instance.id/Editor/MyEditor.uxml");
VisualElement editorLayout = visualTree.CloneTree();
root.Add(editorLayout);
}
Is there some sort of… display dummy or placeholder item? Not sure what to call it. Something that I can tie to an item somehow so that I can put it into the uxml to force a specific item created in C# to display in a particular place in the layout?