Reproduction steps:
1. Open the “UxmlElementAttribute.zip“ project
2. Select the “Assets/Scripts/UI/Resources/UXML1.uxml“ asset
3. Open “Assets/Scripts/UI/Resources/UXML2.uxml“ in UI Builder
4. In the Library section open the Project tab
5. Drag “Custom Controls (C#) > UI > Controls > CustomControl” over “UI Documents (UXML) > Assets > Scripts > UI > Resources > UXML1.uxml“
Expected result: No UxmlElementAttribute errors in Console
Actual result: “Element 'UI.Control.CustomControl' is missing a UxmlElementAttribute and has no registered factory method” errors in Console after the 2nd and 5th steps
Reproduced in: 2023.2.0a9, 2023.2.0a17
Could not test in: 1.0.0-preview.18 (2020.3.48f1), 2021.3.26f1, 2022.3.0f1, 2023.1.0b19, 2023.2.0a8 (UxmlElement and UxmlElementAttribute not found errors)
Reproduced using: macOS 13.3.1 (Intel), Windows 10 (by the reporter)
Full error after the 2nd step:
Element 'UI.Control.CustomControl' is missing a UxmlElementAttribute and has no registered factory method.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()
Full error after the 5th step:
Element 'UI.Control.CustomControl' is missing a UxmlElementAttribute and has no registered factory method.
UnityEngine.UIElements.VisualTreeAsset:CloneTree ()
Unity.UI.Builder.BuilderLibraryProjectScanner/<>c_DisplayClass9_0:<ImportUxmlFromProject>b_0 ()
Unity.UI.Builder.BuilderLibraryView:OnItemMouseEnter (UnityEngine.UIElements.MouseEnterEvent)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)