Search Unity

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

Localization errors after ugprade from 0.10.0 to 1.2.1

Discussion in 'Open Projects' started by procopy01, Apr 11, 2022.

  1. procopy01

    procopy01

    Joined:
    Apr 24, 2020
    Posts:
    12
    I just updated my localization package from 0.10.0 and it would seem there were some fundamental changes in the meantime.

    I was using this method to call strings:

    Code (CSharp):
    1.     private IEnumerator Start()
    2.     {  
    3.         var tableLoading = _localizedStringTable.GetTable();
    4.         yield return tableLoading;
    5.         _currentStringTable = tableLoading.Result;
    6.         str = _currentStringTable[actionString].LocalizedValue;
    7.     }
    but it would now return "error CS1061: 'StringTable' does not contain a definition for 'Result' and no accessible extension method 'Result' accepting a first argument of type 'StringTable' could be found (are you missing a using directive or an assembly reference?)".
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    We changed GetTable to no longer be async, so change it to use GetTableAsync and it should work again.