Add UIElements support to SubclassSelectorDrawer - #1
Add UIElements support to SubclassSelectorDrawer#1google-labs-jules[bot] wants to merge 5 commits into
Conversation
Implemented `CreatePropertyGUI` in `SubclassSelectorDrawer` to support UIElements inspectors. The drawer now displays a label, a button for type selection (using the existing `AdvancedTypePopup`), and dynamically rebuilds the property fields when the managed reference type changes. It falls back to iterating through child properties for display, ensuring compatibility with standard inspectors.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
Implemented `CreatePropertyGUI` in `SubclassSelectorDrawer` to support UIElements inspectors. The drawer now displays a label, a button for type selection (using the existing `AdvancedTypePopup`), and dynamically rebuilds the property fields when the managed reference type changes. Crucially, this update includes support for Custom Property Drawers for the selected subclass: - Checks if a Custom Property Drawer exists for the selected type. - Tries to use the custom drawer's `CreatePropertyGUI` (UI Toolkit support). - Falls back to `IMGUIContainer` wrapping the custom drawer's `OnGUI` (IMGUI support) if UIElements support is missing. - Defaults to iterating through child properties if no custom drawer is found. This ensures both standard properties and custom-drawn properties are rendered correctly in UI Toolkit environments.
Implemented `CreatePropertyGUI` in `SubclassSelectorDrawer` to provide a robust UIElements inspector experience. - Replaced the simple button with a styled Dropdown visual (using `unity-popup-field` classes) that properly fills the inspector width (`flex-grow: 1`). - Added comprehensive support for Custom Property Drawers: - Tries `CreatePropertyGUI` first for native UIElements drawers. - Falls back to `IMGUIContainer` wrapping `OnGUI` for legacy drawers. - Defaults to child iteration if no drawer is found. - Maintains the existing `AdvancedTypePopup` logic for fuzzy type searching.
… handling - Implemented `CreatePropertyGUI` in `SubclassSelectorDrawer` for full UIElements support. - Designed the selector to match Unity's native Dropdown style (using `unity-popup-field` classes). - Added robust support for `CustomPropertyDrawer`: tries UIElements first, falls back to IMGUI. - Added `ShowFullNamespace` property to `SubclassSelectorAttribute` to optionally force full namespace hierarchy in the type popup. - Updated `AdvancedTypePopup` to respect the namespace setting.
Added UIElements support to
SubclassSelectorDrawer.csby implementingCreatePropertyGUI. The drawer now constructs a VisualElement hierarchy that mimics the IMGUI layout: a header with a label and a button to select the subclass, followed by the properties of the selected subclass.CreatePropertyGUImethod.AdvancedTypePopupusing the button'sworldBound.PropertyFieldfor child properties.UnityEngine.UIElementsandUnityEditor.UIElements.PR created automatically by Jules for task 13734061030980915401 started by @canoide