Unify SerializeReference selector into [TypeSelector] with usage analyzer#50
Merged
VPDPersonal merged 5 commits intoJun 11, 2026
Conversation
- Remove `[SerializeReferenceSelector]`; `[TypeSelector]` now also drives `[SerializeReference]` managed-reference fields, dispatching by property type in `TypeSelectorPropertyDrawer`. - The attribute's base types narrow the candidate list below the declared field type — applied to both concrete types and open generic definitions, in the dropdown and the missing-type Fix picker. - Update samples, CHANGELOG and READMEs (EN/RU) to the merged attribute.
- Add the `Aspid.FastTools.Analyzers` git submodule (VPDPersonal/Aspid.FastTools.Analyzers) carrying the `AFT*` [TypeSelector] usage rules. - Ship the prebuilt `Aspid.FastTools.Analyzers.dll` with a `RoslynAnalyzer`-labelled meta (all platforms excluded), mirroring the generator DLL. - Document the submodule and its manual rebuild/deploy in CLAUDE.md.
- Bump the analyzer submodule: AFT0003 now also flags a sealed class paired with an interface it does not implement; redeploy the prebuilt DLL. - Switch the submodule URL from SSH to HTTPS so public clones resolve it without keys. - Add the rebuild-analyzers-on-change PostToolUse hook script and the build-analyzer skill mirroring the generator pipeline; document both in CLAUDE.md.
7d6e215
into
feature/serialize-reference-dropdown
3 checks passed
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
[SerializeReferenceSelector]:[TypeSelector]now drives both field shapes — astringstoring an assembly-qualified type name and a[SerializeReference]managed reference — dispatching bySerializedProperty.propertyTypeinTypeSelectorPropertyDrawer.[TypeSelector(typeof(IMelee))]on anIWeaponfield offers onlyIMeleeimplementations). Narrowing applies to concrete types and open generic definitions, in the dropdown and in the missing-type Fix picker.Aspid.FastTools.Analyzersgit submodule (repurposed from the dormantUnityFastToolsAnalyzersrepo) shipping a prebuilt Roslyn DLL with compile-time usage rules:AFT0001(unsupported field shape, Error),AFT0002(Allowon a managed reference, Warning),AFT0003(base type provably disjoint with the field type, Warning). 13 xUnit tests, release tracking enabled.build-analyzerskill andrebuild-analyzers-on-change.shPostToolUse hook script mirroring the generator pipeline; samples, CHANGELOG and all four READMEs migrated to the merged attribute.Notes for review
1ce483b(VPDPersonal/Aspid.FastTools.Analyzers, HTTPS URL). The DLL meta mirrors the generator's (RoslynAnalyzerlabel, all platforms excluded)..claude/settings.jsonhooks.PostToolUse— adding the entry is a one-line follow-up.SerializeReferenceSelectorAttributewas never released (1.0.0-rc.5predates it), so its removal is not a breaking change for package consumers.