Repository navigation
Add metadata-based smart parameter type mapping (1.3.0) - #17
Merged
Merged
Conversation
Smart Parameter Types = Mapping reads parameter types from the new Smart Parameter Types metadata on a shared table entry and infers the rest. Mapped types that plural or list cannot format are reported as warnings, as are unknown, empty and duplicate names. Changing the smart string settings asks whether to regenerate. Bump version to 1.3.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
SmartParameterTypesmetadata (Localization Codegen / Smart Parameter Types) on the shared table entry, so the table text is untouched. Parameters without a row are inferred likeInferred, and positional parameters (0/{0}) can be typed too.plural/p(String,Bool,Char,DateTime,Object) or bylist/l(anything butList), and for rows that name a missing parameter, have no name, or repeat a name.Why metadata
An inline
[int]{count}prefix sits outside the placeholder, so Unity's SmartFormat would show it to players as literal text. Stripping it at runtime would mean modifying the loaded tables. Metadata keeps the text clean and gives the type a dropdown.Testing
SmartParameterMappingTests. The generated-code compile test now includes mappedint/string/decimal/DateTimeparameters.🤖 Generated with Claude Code