Repository navigation
Add opt-in LoadTable and LoadEntries methods (1.3.1) - #18
Merged
Merged
Conversation
Load Table Method emits LoadTable() on every table class, returning Task<StringTable> / Task<AssetTable>, plus LoadTableAsync with UniTask Members. The runtime awaits the Localization operation through its completion callback, so it also works on WebGL. Off by default and claimed after key names, so existing output and members don't change. Bump version to 1.3.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Load Table Method on, asset table classes also get LoadEntries() (and LoadEntriesAsync with UniTask), which preloads the table and the assets of all its entries through PreloadTables. LoadTable stays table-only. 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
Task<AssetTable>and load the table only, not its assets. Asset table classes also getLoadEntries(), which loads the table plus the assets of all its entries throughPreloadTables. Tables marked No Preload in their Preload Asset Table metadata are loaded without their assets. With UniTask Members there are alsoLoadTableAsync(CancellationToken)andLoadEntriesAsync(CancellationToken).LocalizedTables.LoadStringTable/LoadAssetTable/LoadAssetTableEntriesandLocalizedTablesUniTask.LoadStringTableAsync/LoadAssetTableAsync/LoadAssetTableEntriesAsync. TheTaskversions finish through the operation'sCompletedcallback instead ofhandle.Task, so they also work on WebGL. When Localization isn't configured they complete withnull.Task, notAsyncOperationHandle, so user asmdefs don't need a newUnity.ResourceManagerreference.LoadTablekeeps its name and the method becomesLoadTable_2.Task,StringTableandAssetTableare reserved class names only while the option is on.Testing
LoadEntrieson asset tables only. The generated-code compile test now runs with the option on.LocalizedTablesUniTaskadditions, because UniTask isn't installed in the test project. CI's UniTask job should cover them.🤖 Generated with Claude Code