Repository navigation
|
A subtype has a custom Which Inspector setups can host a UI Toolkit-only drawer, and what is needed to support IMGUI Inspectors as well? |
Replies: 1 comment
|
SerializeReferenceExtensions 2.0.0 supports both IMGUI and UI Toolkit. A selected subtype's custom drawer still needs an implementation that its parent Inspector can use. Unity cannot run a UI Toolkit In Unity 2021.3, use a custom UI Toolkit Inspector to host UI Toolkit-only drawers. From Unity 2022.2, the default Inspector uses UI Toolkit for custom property drawers, while custom Inspectors can still use IMGUI. Unity's PropertyDrawer documentation includes examples of both implementations. |
SerializeReferenceExtensions 2.0.0 supports both IMGUI and UI Toolkit. A selected subtype's custom drawer still needs an implementation that its parent Inspector can use.
Unity cannot run a UI Toolkit
PropertyDrawerinside an IMGUI custom Inspector or a parent IMGUI drawer. A drawer that only implementsCreatePropertyGUItherefore needs a UI Toolkit parent. To support IMGUI parents too, provideOnGUIand the correspondingGetPropertyHeightimplementation.In Unity 2021.3, use a custom UI Toolkit Inspector to host UI Toolkit-only drawers. From Unity 2022.2, the default Inspector uses UI Toolkit for custom property drawers, while custom Inspectors can still use IMGUI.
Unity's PropertyDrawer…