Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to make Scriptable Objects, Scene Objects and Prefabs hand localizable like the UI TMP_Text box

Discussion in 'Localization Tools' started by EversorDvL, Nov 20, 2023.

  1. EversorDvL

    EversorDvL

    Joined:
    Sep 26, 2015
    Posts:
    8
    Version 2022.3.5f1 Localization Package 1.4.5

    I like the way the TMP_Text UI Component is localized. I don't have a huge database so hand-localization is perfectly doable, specifically for the classes i already have in the game, which contain a fair amount of text.

    upload_2023-11-20_17-25-59.png

    Unfortunately when i try to edit a ScriptableObject i don't get the "green textbox" while localizing and the content i type in "Italian" overwrites the English/Standard content.
    Also if i use right click on a string field on a Scr.Obj there is no "localizeProperty" option.

    upload_2023-11-20_17-12-41.png

    The same happens on a Prefab with a Scripted behaviour, like our WeaponController. It's strings cannot be localized. As I type for the first time it seems like the system is starting up as i see a green textbox flicker, but then it returns dark grey and the behaviour is similar to that i have seen in the scriptable objects.

    upload_2023-11-20_17-23-29.png
     
  2. EversorDvL

    EversorDvL

    Joined:
    Sep 26, 2015
    Posts:
    8
    Actually the problem with the prefabs should be solved, as I understood that editing the properties from the Project window does not work, while doing it after opening the Prefab in a scene view does.
     
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,142
    Hi,
    We don't support scriptable objects, we need to attach the data to the object and there's not way to do that with a scriptable object. I would use the LocalizedString and LocalizedAssets for this.