Skip to content

fix(serialize-reference): remove attribute-free dropdown fallback inspectors#98

Merged
VPDPersonal merged 2 commits into
mainfrom
refactor/remove-serialize-reference-auto-dropdown
Jul 3, 2026
Merged

fix(serialize-reference): remove attribute-free dropdown fallback inspectors#98
VPDPersonal merged 2 commits into
mainfrom
refactor/remove-serialize-reference-auto-dropdown

Conversation

@VPDPersonal

@VPDPersonal VPDPersonal commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removed SerializeReferenceFallbackInspector and its MonoBehaviour/ScriptableObject isFallback subclasses, SerializeReferenceAutoDropdown, the "Dropdown without [TypeSelector]" per-user setting, its Settings UI switch, and their tests.
  • Ported the two still-needed helpers (IsManagedReferenceArray/GetElementType) into SerializeReferenceEditorGUI directly — its public CreateField/CreateList/DrawFieldLayout facade for custom editors is unaffected.
  • Dropped the CHANGELOG entry for this feature — it was still under [Unreleased], so it never shipped.

Why

  • The removed isFallback custom editors intercepted every MonoBehaviour/ScriptableObject inspector project-wide.
  • When nothing needed substituting, CreateInspectorGUI() returned null. The class's own doc comment claimed this "hands the component back to Unity's default inspector untouched" — that's not what actually happens.
  • Once Unity commits to a custom Editor instance, null from CreateInspectorGUI() 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 own OnInspectorGUI() — never overridden, so classic IMGUI ran instead.
  • Effect: any PropertyDrawer implementing only CreatePropertyGUI (UIToolkit) and not OnGUI (IMGUI) — e.g. EnumValuesPropertyDrawer — silently fell back to Unity's built-in "No GUI Implemented" placeholder on every component without its own custom editor.
Check Before After
Editor resolved for a plain MonoBehaviour SerializeReferenceMonoBehaviourFallbackInspector UnityEditor.GenericInspector
CreateInspectorGUI() result null (falls through to IMGUI) a real VisualElement

Verified live via unicli Eval against a sample DamageDealer component. Full EditMode suite (163/163) still passes after the removal.

Notes for review

Linked issues

…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
@VPDPersonal VPDPersonal added type: fix Bug fix status: work-in-progress Draft / not ready for review area: editor Editor-only code labels Jul 3, 2026
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.
@VPDPersonal VPDPersonal added status: needs-review Ready for review and removed status: work-in-progress Draft / not ready for review labels Jul 3, 2026
@VPDPersonal VPDPersonal marked this pull request as ready for review July 3, 2026 13:18
@VPDPersonal VPDPersonal merged commit dfb5808 into main Jul 3, 2026
3 checks passed
@VPDPersonal VPDPersonal deleted the refactor/remove-serialize-reference-auto-dropdown branch July 3, 2026 13:19
@github-actions github-actions Bot removed the status: needs-review Ready for review label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: editor Editor-only code type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant