fix(serialize-reference): remove attribute-free dropdown fallback inspectors#98
Merged
VPDPersonal merged 2 commits intoJul 3, 2026
Merged
Conversation
…pectors - Delete SerializeReferenceFallbackInspector, its MonoBehaviour/ScriptableObject isFallback subclasses, and SerializeReferenceAutoDropdown, along with the "Dropdown without [TypeSelector]" per-user setting, its Settings UI switch, and their tests - These isFallback custom editors intercepted every MonoBehaviour/ScriptableObject inspector; returning null from CreateInspectorGUI() when nothing needed substituting fell through to legacy IMGUI instead of Unity's real UIToolkit GenericInspector default, silently breaking any PropertyDrawer that only implements CreatePropertyGUI (e.g. EnumValuesPropertyDrawer showed "No GUI Implemented"). Verified via unicli Eval: DamageDealer's inspector now resolves to GenericInspector with a working CreateInspectorGUI - Port the two still-needed helpers (IsManagedReferenceArray/GetElementType) into SerializeReferenceEditorGUI directly; its public CreateField/CreateList/ DrawFieldLayout facade for custom editors is unaffected - Drop the CHANGELOG entry for this feature — it was still under [Unreleased], so it never shipped
Missed by the earlier removal commit — EN/RU QA-CHECKLIST still had the "Fallback dropdown without [TypeSelector]" item and a reference to its per-user toggle in the Settings section. Kept a trimmed item for the still-existing SerializeReferenceEditorGUI facade.
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.
Summary
SerializeReferenceFallbackInspectorand itsMonoBehaviour/ScriptableObjectisFallbacksubclasses,SerializeReferenceAutoDropdown, the "Dropdown without[TypeSelector]" per-user setting, its Settings UI switch, and their tests.IsManagedReferenceArray/GetElementType) intoSerializeReferenceEditorGUIdirectly — its publicCreateField/CreateList/DrawFieldLayoutfacade for custom editors is unaffected.[Unreleased], so it never shipped.Why
isFallbackcustom editors intercepted everyMonoBehaviour/ScriptableObjectinspector project-wide.CreateInspectorGUI()returnednull. The class's own doc comment claimed this "hands the component back to Unity's default inspector untouched" — that's not what actually happens.Editorinstance,nullfromCreateInspectorGUI()does not reroute to Unity's real default (GenericInspector, which itself builds a proper UIToolkit tree in Unity 6). It just falls through to that same editor's ownOnInspectorGUI()— never overridden, so classic IMGUI ran instead.PropertyDrawerimplementing onlyCreatePropertyGUI(UIToolkit) and notOnGUI(IMGUI) — e.g.EnumValuesPropertyDrawer— silently fell back to Unity's built-in"No GUI Implemented"placeholder on every component without its own custom editor.MonoBehaviourSerializeReferenceMonoBehaviourFallbackInspectorUnityEditor.GenericInspectorCreateInspectorGUI()resultnull(falls through to IMGUI)VisualElementVerified live via
unicli Evalagainst a sampleDamageDealercomponent. Full EditMode suite (163/163) still passes after the removal.Notes for review
mainfor both.Linked issues
—