TextMeshPro Font Asset and Material Preset

More
8 years 7 months ago #1415 by wagenheimer
Does I2 Localization supports changing "Font Asset and Material" per language on TextMeshPro?

How can I do this? There are some labels I don't want to localize the Label, just change the Font Asset e Material Preset. Is this possible?

Thanks

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #1416 by Frank

Does I2 Localization supports changing "Font Asset and Material" per language on TextMeshPro?


Yes,
- Just create a font or material per language
- Create a term (ID) for the Font, and add the per-language variations as translations,
- assign a Localize componnet and set the Secondary Term

The process is described here:
inter-illusion.com/assets/I2Localization...FontperLanguage.html

There are some labels I don't want to localize the Label, just change the Font Asset e Material Preset. Is this possible?


Localize component has a Main term which controls the Text's translation and Secondary term to control the Font per-langauge

If you want to change the font, but not the text, then set the Font Term into the Secondary Term, and make the Main term <none>

Font Asset and Material


The integration with TMPro support changing the Font (which includes the material) or just the Material (keeps the font data but change the text properties: stride, bevel, etc)

When you are creating the Secondary Term, you can either drag for each translation a TMPro font asset or a Material.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago - 8 years 7 months ago #1464 by wagenheimer
Hummm!

Changing the font it works, or just the material it also works!

But I need to change the Font and the Material. Maybe a Terciary term? What did you suggest?

It seems TextMeshPro supports changing the font by the material.

.
Last edit: 8 years 7 months ago by wagenheimer.

Please Log in or Create an account to join the conversation.

More
8 years 7 months ago #1466 by Frank
Hi,
There is a feature for the main translation to override the font as well:

Instead of (Primary:MyText, Secondary:MyFont)
It can be (Primary:[MyFont]MyText)

The plugin extracts the [FontName] from the primary translation. That was introduced to allow changing the font from inside the Spreadsheet for ALL labels using that term.

Currently, the plugin doesn't support the same for the Secondary term, but I'm planning in adding that feature too. That would solve the problem of changing Font and Material. Given that you can do (Secondary: [Material]Font).
As soon as I finish fixing the IOS integration and the improvements to the Touch/Normal specializations, I will add this feature.

Part of it, its also modifying how the inspector works, so that it also gives feedback of what you are setting (instead of "Primary" and "Secondary" term, it should show based on what object you are localizing "Text" and "Font" or "Sprite" and "Atlas").
My plan is to also add a 3rd tab that will be visible when needed (Text, Font, Material)


Said that, for TMP, using the Material presets you should be able to modify the Material which in turn will set the corresponding Font.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #1645 by wagenheimer
Hi!

I still have a problem with this!

I have a TextMeshProUGUI which I don't have a localized text (it's player input text), but I need to localize the Material (Font and Material).

I made the localization using the Secondary Terms and everything was working!

But if the player enter as text some of the existing TAGS, I2 will translate it, even I don't using anything on Main target!

How can I avoid this?

Please Log in or Create an account to join the conversation.

Time to create page: 0.201 seconds
Template by JoomlaShine