Parsing issue in a somewhat complex smart string

The following string fails to parse as is (and is how I would normally try to write it I think). Quick note, the number and link formatters are created by me and appear to be working correctly.

Also I have no idea how to remove the emojis from the example but the emoji is just : following by ‘p’ for plural.

The follow error is given:

I managed to fix the formatting issue by placing an empty space after “{:link(true)}” and also had to add the space after “{:link(poison)}” and remove the space before “damage” so it formatted correctly. Below is the changed string.

Feels like the space shouldn’t matter shouldn’t need to be added and makes formatting the rest of the string more awkward?

Localization Verison: 1.3.2 (also tried with 1.4.0-exp.1 and it still is an issue)
Unity Version: 2020.3.17f1

Ah yes this is due to the string .format support. {{ Or }} Is a literal { and }. We have an option to disable this mode to get the behaviour you want. Enable Alternative Escaping in the parser settings.
https://docs.unity3d.com/Packages/com.unity.localization@1.3/manual/LocalizationSettings.html

Right there in the docs and a super easy fix :slight_smile: Thanks a lot for the quick response!

1 Like