Class LocalizationCollectionAdoption
Adopts Serenity's shipped localization tables as Unity Localization collections of the project's own,
through the Localization package's API. A byte-for-byte copy of a table belongs to no collection: the
Localization Settings wizard reads a binding to it as unresolved, and the runtime — which loads a table
through its collection's name — never finds it. Each shipped collection an adoption reaches becomes a new
collection named by the rule that renames every other adopted asset (AdoptedIdentityRules),
holding every key under its original key id, every translation and the metadata attached to either; a later
adoption reuses it instead of making another. The package registers the new tables in its own Addressables
groups, which is where the runtime loads string and asset tables from.
Inheritance
LocalizationCollectionAdoption
Implements
ISerenityDelegatedAdoption
Assembly: Serenity.UnityLocalization.Installation.Editor.dll
Syntax
public sealed class LocalizationCollectionAdoption : ISerenityDelegatedAdoption
Constructors
LocalizationCollectionAdoption()
Declaration
public LocalizationCollectionAdoption()
Methods
Adopt(IReadOnlyList<string>, Func<string, string>, SerenityAssetCreationTransaction, Action<string>)
Declaration
public SerenityDelegatedAdoptionResult Adopt(IReadOnlyList<string> ownedSourcePaths, Func<string, string> mirrorDestinationPath, SerenityAssetCreationTransaction transaction, Action<string> log)
Parameters
Returns
| Type |
Description |
| SerenityDelegatedAdoptionResult |
|
DescribeAdoption(IReadOnlyList<string>)
Declaration
public IReadOnlyList<string> DescribeAdoption(IReadOnlyList<string> ownedSourcePaths)
Parameters
Returns
Owns(string)
Declaration
public bool Owns(string sourceAssetPath)
Parameters
| Type |
Name |
Description |
| string |
sourceAssetPath |
|
Returns
RepointClones(IReadOnlyList<string>)
A cloned localization settings asset now references the adopted tables, but its binding still
NAMES the shipped collection — and the runtime loads a table by that name. Each binding is renamed after
the collection its table actually belongs to.
Declaration
public void RepointClones(IReadOnlyList<string> clonedAssetPaths)
Parameters
Implements
Serenity.Global.Infrastructure.Editor.ISerenityDelegatedAdoption