Skip to content

Variable dropdown and Add All Parameters for Smart Parameter Types (1.3.2) - #20

Merged
Severnbli merged 2 commits into
mainfrom
feature/metadata-dropdown
Oct 28, 2026
Merged

Severnbli merged 2 commits into
mainfrom
feature/metadata-dropdown

Conversation

@Severnbli

@Severnbli Severnbli commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • A property drawer for the Smart Parameter Types metadata:
    • Each row's name is a dropdown of the entry's variables across every locale, labelled with formatters and locales, e.g. count (plural; en, ru) or bonus (de). Names already used in another row are disabled.
    • Add Parameter adds one variable. Add All Parameters adds a row for every variable without one, pre-filled with the inferred type (plural → Int, list → List, otherwise Object), so only the types are left to pick.
    • A warning icon marks rows that generation would warn about (wrong type for plural/list, unknown, duplicate or empty name); hovering it shows the reason.
    • Outside a string table entry, the name falls back to a text field with a hint.
  • The variable list follows the generator's rules: positional placeholders first, with gaps included because the method has a parameter for them; Global Variables Groups are skipped.
  • Menu callbacks hold the serialized object and the property path rather than the SerializedProperty, apply their changes with undo, and mark the code for regeneration.
  • New SmartVariableCatalog holds the logic so it can be unit tested apart from the IMGUI drawer.
  • README, CHANGELOG, and version bump to 1.3.2.

Testing

  • EditMode tests in Unity 6000.6.6f1 batch mode: 164 passed, 0 failed, 1 skipped (UniTask compile, since UniTask isn't installed).
  • New SmartVariableCatalogTests: merging locales and ordering, positional gaps, global variables, inferred types, labels, missing rows, name lookup, and warning texts.
  • Not checked by hand: the drawer in the Table Editor's metadata window. Please open an entry's metadata and try the dropdown and the buttons.

🤖 Generated with Claude Code

Severnbli and others added 2 commits October 28, 2026 10:42
A property drawer for SmartParameterTypes lists the variables the entry
uses in any locale. Row names are a dropdown labelled with formatters
and locales, Add Parameter adds one variable, and Add All Parameters
adds every variable without a row with its inferred type. Rows that
generation would warn about show a warning icon with the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Severnbli Severnbli changed the title Variable dropdown and Add All Parameters for Smart Parameter Types Variable dropdown and Add All Parameters for Smart Parameter Types (1.3.2) Oct 28, 2026
@Severnbli Severnbli self-assigned this Oct 28, 2026
@Severnbli Severnbli added the feature New feature or request label Oct 28, 2026
@Severnbli
Severnbli merged commit 42d9262 into main Oct 28, 2026
21 of 23 checks passed
@Severnbli

Copy link
Copy Markdown
Owner Author

#19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant