Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question All data in tables lost after reopening Unity project

Discussion in 'Localization Tools' started by TCYeh, Nov 25, 2022.

  1. TCYeh

    TCYeh

    Joined:
    Jul 25, 2022
    Posts:
    14
    The data all disappeared every time I reopened my Unity project like below:
    localizationTables.png

    I've checked the Table Collection and each String Table asset. It looks like every data exists.
    tableCollection.png

    table_en.png

    table_ru.png

    This happens in both string tables and asset tables.
    My Unity editor version is 2020.3.27, and the package version is 1.3.2.

    Did I miss any settings?

    Btw, I generate the context programmatically in edit mode (with a menu item). Would it be the reason?
    table = LocalizationSettings.StringDatabase.GetTable(tableName, LocalizationEditorSettings.GetLocale(textAsset.name));

    table.AddEntry(key, localized);


    And I set it dirty every time the table is modified.
    EditorUtility.SetDirty(table);
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,056
    Last edited: Nov 25, 2022
  3. TCYeh

    TCYeh

    Joined:
    Jul 25, 2022
    Posts:
    14
    It works! Thanks a lot!
     
    karl_jones likes this.