References and sources

  • Tatanan
  • Topic Author
  • Offline
  • New Member
  • New Member
  • Games developer for Android, iOS and PC.
5 years 2 months ago #419 by Tatanan
I have 3 doubts:
  1. Whats is the tool shown in the attacked picture for?
  2. On a localized UILabel, there's a field called "References" which is set always to "None (Object)". See attached picture 2. What's that for?
  3. I have more than 1 Source, how does I2 decide which terms to show?, ie, how does it decide which resource to use in a localized object? If you are going to tell me "all of them", then: if I add a term through a localized term, which source does it goes to?

Thank you.

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

5 years 2 months ago #423 by Frank
Replied by Frank on topic References and sources
The plugin can localize not only text, but also objects like Fonts, Atlas, Textures, etc.
Normally, if you want to localize something that is an object, the term will store the Object's name. At runtime, the object is loaded from Resources, but some times, you don't want to store all localizable objects in the Resources folder (Specially when packing new localized scenes into a bundle). Thats where References is used.

If for example, you are going to localize a texture, and you drag the texture into the term translation, the plugin will detect whatever the texture is inside a resource folder or not. If its in a resource folder, then only the texture's name is stored, as later on, it can load the texture by using the name.

If its not in a Resource folder, then the plugin stores a reference to that texture in that Reference's List. At runtime, when the texture is needed, the plugin will look first in that list, and if the texture is not there, it will assume that its on the Resources folder and try loading it from there.

You can references in the Language Source (so they are global to any Localize component using it) or inside the Localize component. So that you could override the used texture for specific terms. That's why there is a reference list in the Localize component and in the LanguageSource.

If you look at the language source in the Standard Assets example, there are some fonts that are loaded from the resources and other that are loaded by using the reference.

When showing the list of terms, the inspector can only show the terms in one Language Source. Normally it will show the last one you selected. If you have a localize component it will show you the terms of the LanguageSource in the scene and fallback to the I2Languages.prefab if there is not LanguageSource in the Scene.

However, if that scene source hasn't be selected before, it may not have been loaded correctly yet, so at the bottom of the Localize component, there is an ObjectField, where you could drag the LanguageSource you want to use. That will force using that language source. So that the plugin will never show other terms for that localize component, even if the source hasn't been loaded yet.

That its used in the example scenes, to make it sure always the local language source is used. If you click on any Localize component in that that scene, you will see that at the end of the inspector there is a reference to the scene source.

Hope that helps,

Attachment References.jpg not found

Attachment ForceSource.jpg not found

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.

Time to create page: 0.146 seconds
Template by JoomlaShine