{{ message }}
Add UIElements support to SubclassSelectorDrawer#1
Draft
google-labs-jules[bot] wants to merge 4 commits intomainfrom
Draft
Add UIElements support to SubclassSelectorDrawer#1google-labs-jules[bot] wants to merge 4 commits intomainfrom
google-labs-jules[bot] wants to merge 4 commits intomainfrom
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.
Author
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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