Shared Constants
The Shared Constants Plugin enables users to define and override commonly used static values. It can be leveraged by other plugins to enable localization.
Usage
Create the plugin and add it to Player:
You can then query the plugin to get the value of a particular key:
Overriding Values in Content
The dataPath
configuration option enables content to override specific values for a particular flow:
using a similar query for prop1
, the value in the content takes precidence and would return B
.
Fallback Values
Any query can also specify an optional default value to return:
Examples
Common Types Plugin
The Common Types Plugin leverages this pattern to allow for global contextual message overrides. In order to override those messages you may use something like:
Any triggerd validation for the length
validation will now use the custom error messages. See the Common Types Plugin for more information on the supported overrides and paths.