Skip to content

Reject unsupported script-folder types - #385

Merged
Eli Pinkerton (wallstop) merged 2 commits into
mainfrom
fix/script-folder-type-eligibility
Oct 21, 2026
Merged

Eli Pinkerton (wallstop) merged 2 commits into
mainfrom
fix/script-folder-type-eligibility

Conversation

@wallstop

@wallstop Eli Pinkerton (wallstop) commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

DISCLOSURE: LLM-GENERATED TEXT

Why: Script-folder scans admit types the ScriptableObject browser cannot manage.

What:

  • Require ScriptableObject assignability in shared type eligibility.
  • Share folder discovery and avoid loading scanned data assets.
  • Cover real folder scans, ordinary types and existing exclusions.

Fixes #376

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation update

Checklist

  • I have added tests that prove my fix is effective
  • I have updated the documentation accordingly
  • I have updated the CHANGELOG for user-facing changes
  • My changes do not introduce breaking changes

Note

Overview
Fixes script-folder “add types” scans admitting types the ScriptableObject browser cannot manage (e.g. MonoBehaviour scripts).

EditorTypeCatalog.IsLoadableType is now public and requires ScriptableObject assignability, so non–ScriptableObject script classes are rejected consistently with the rest of the eligibility rules.

Folder discovery moves into EditorTypeCatalog.FindTypesInFolder: DataVisualizer.AddTypesFromFolder calls it and filters out already-managed types. Asset-folder scans use GetMainAssetTypeAtPath instead of loading ScriptableObject instances, avoiding side effects during discovery.

Tests cover eligibility matrix, real script/asset folder scans (including excluding behaviours), invalid/missing folders, and docs/CHANGELOG updates for the new API.

Reviewed by Cursor Bugbot for commit fa2166d. Bugbot is set up for automated code reviews on this repo. Configure here.

Script-folder scans accept MonoBehaviours and plain classes that the
ScriptableObject browser cannot manage. Require ScriptableObject
assignability in shared eligibility and use one folder-discovery path.
Keep deduplication, saved managed types and ordinal type ordering.
Asset-folder discovery reads main-asset metadata without loading assets.

The original predicate returned true for a plain test class on the live
host. The final tree passes 705 EditMode and 15 PlayMode tests on Unity 6000.5.2f1 Windows,
including actual script and asset scans, ordinary SOs and exclusions.
The 16-step local gate passes. The npm archive matches checkout bytes
and contains only the 249 allowed payload files. Unity 2021.3 and other
platforms remain unexecuted.

An initial full run hit a persistent native UI Toolkit lock assertion in
26 UI tests. A clean host restart removed the assertion; the full suite
then passed without suppressing logs. No persistent host asset was dirty
before restart. The clean host retains its original seven editor windows.

Fixes #376.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 44d05f6. Configure here.

Comment thread Editor/DataVisualizer/DataVisualizer.cs
Folder pickers can return unimported or case-varied paths. Resolve scan
folders through Unity GUIDs and return no matches for unavailable folders
instead of throwing in the browser callback. Preserve strict eligibility.

All 39 focused catalog cases pass on Unity 6000.5.2f1 Windows, including
unimported folders, null/empty paths and case-varied real asset scans.
The functional parent passed 705 EditMode and 15 PlayMode tests. The
16-step review gate passes. Unity 2021.3 and other platforms are unexecuted.

Refs #376, #385. Address PRRT_kwDOOhJZ9s6upRue.
@wallstop
Eli Pinkerton (wallstop) added this pull request to stack #387 October 21, 2026 06:34
@wallstop
Eli Pinkerton (wallstop) merged commit a8d4ef3 into main Oct 21, 2026
5 checks passed
@wallstop
Eli Pinkerton (wallstop) deleted the fix/script-folder-type-eligibility branch October 21, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reject non-ScriptableObject script-folder types

1 participant