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.
  2. Dismiss Notice

Crash (most likely cause of Localization)

Discussion in 'Localization Tools' started by compyler, Feb 12, 2021.

  1. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    Hi,

    I am using Localization (Unity 2019.4.20f1) in my project and it works when I run my game from Editor on my PC.

    Now I copied the project on my Mac and made an iOS built. When the game started on my iPhone I got a crash with this message:
    Code (CSharp):
    1. GameState file does not exist. Creating default GameState
    2. GameManager:LoadGameState()
    3. <Start>d__22:MoveNext()
    4. UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
    5. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    6. MissingMethodException: Default constructor not found for type UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]
    7.   at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
    8.   at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00000] in <00000000000000000000000000000000>:0
    9.   at UnityEngine.ResourceManagement.Util.LRUCacheAllocationStrategy.New (System.Type type, System.Int32 typeHash) [0x00000] in <00000000000000000000000000000000>:0
    10.   at UnityEngine.ResourceManagement.ResourceManager.CreateOperation[T] (System.Type actualType, System.Int32 typeHash, System.Int32 operationHash, System.Action`1[T] onDestroyAction) [0x00000] in <00000000000000000000000000000000>:0
    11.   at UnityEngine.ResourceManagement.ResourceManager.ProvideResource (UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation location, System.Type desiredType, System.Boolean releaseDependenciesOnFailure) [0x00000] in <00000000000000000000000000000000>:0
    12.   at UnityEngine.ResourceManagement.ResourceManager.ProvideResource[TObject] (UnityEngine.ResourceManagement.ResourceLocations.IResourceLocation location) [0x00000] in <00000000000000000000000000000000>:0
    13.   at UnityEngine.AddressableAssets.Initialization.InitializationOperation.CreateInitializationOperation (UnityEngine.AddressableAssets.AddressablesImpl aa, System.String playerSettingsLocation, System.String providerSuffix) [0x00000] in <00000000000000000000000000000000>:0
    14.   at UnityEngine.AddressableAssets.AddressablesImpl.InitializeAsync (System.String runtimeDataPath, System.String providerSuffix, System.Boolean autoReleaseHandle) [0x00000] in <00000000000000000000000000000000>:0
    15.   at UnityEngine.AddressableAssets.AddressablesImpl.get_ChainOperation () [0x00000] in <00000000000000000000000000000000>:0
    16.   at UnityEngine.AddressableAssets.AddressablesImpl.LoadAssetsAsync[TObject] (System.Object key, System.Action`1[T] callback, System.Boolean releaseDependenciesOnFailure) [0x00000] in <00000000000000000000000000000000>:0
    17.   at UnityEngine.AddressableAssets.Addressables.LoadAssetsAsync[TObject] (System.Object key, System.Action`1[T] callback) [0x00000] in <00000000000000000000000000000000>:0
    18.   at UnityEngine.Localization.Settings.LocalesProvider.get_PreloadOperation () [0x00000] in <00000000000000000000000000000000>:0
    19.   at UnityEngine.Localization.Settings.LocalizationSettings.GetSelectedLocaleAsync () [0x00000] in <00000000000000000000000000000000>:0
    20.   at UnityEngine.Localization.InitializationOperation.LoadLocales () [0x00000] in <00000000000000000000000000000000>:0
    21.   at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].InvokeExecute () [0x00000] in <00000000000000000000000000000000>:0
    22.   at UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject].Start (UnityEngine.ResourceManagement.ResourceManager rm, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency, DelegateList`1[T] updateCallbacks) [0x00000] in <00000000000000000000000000000000>:0
    23.   at UnityEngine.ResourceManagement.ResourceManager.StartOperation[TObject] (UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1[TObject] operation, UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle dependency) [0x00000] in <00000000000000000000000000000000>:0
    24.   at UnityEngine.Localization.Settings.LocalizationSettings.GetInitializationOperation () [0x00000] in <00000000000000000000000000000000>:0
    25.   at GameManager+<Start>d__22.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
    26.   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
    27. (Filename: currently not available on il2cpp Line: -1)
    28.  
    I assume there is a problem with the Localization?

    I tried one thing: I went to Window -> Asset Management -> Addressables -> Groups. "Default Local Group (Default)" is highlighted (not sure if this means anything). Then I go Build -> New Build -> Default Build Script. When I do this, I got another error about an invalid cast:
    Code (CSharp):
    1. InvalidCastException: Specified cast is not valid.
    2. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.DoBuild[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext aaContext) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:235)
    3. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:77)
    4. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase.BuildData[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Build/DataBuilders/BuildScriptBase.cs:84)
    5. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContentImpl () (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Settings/AddressableAssetSettings.cs:1898)
    6. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContent () (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Settings/AddressableAssetSettings.cs:1880)
    7. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildPlayerData () (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:280)
    8. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildScript (System.Object context) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:275)
    9. UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:119)
    10.  
    Now I am out of ideas :( Anyone has an idea what could be the problem and what I can do?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Hi,
    This looks like an Addressables bug. Could you please file a bug report so we can look into it?

    Do you have code stripping enabled in the player settings? Could you try disabling it?
     
  3. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    Hello Karl,

    Thanks for your response!
    I disabled "Strip Engine Code" under Player -> Optimization ("Managed Stripping Level" is "Low", I cant disable it), but I still get the InvalidCastException.

    I also think its a problem with the Addressables and it has nothing to do with iOS, because I tested it on my Windows PC and I get the same error when I build the Addressable:
    Code (CSharp):
    1. InvalidCastException: Specified cast is not valid.
    2. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.DoBuild[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext aaContext) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:235)
    3. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:77)
    4. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase.BuildData[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Build/DataBuilders/BuildScriptBase.cs:84)
    5. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContentImpl () (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Settings/AddressableAssetSettings.cs:1898)
    6. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContent () (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/Settings/AddressableAssetSettings.cs:1880)
    7. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildPlayerData () (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:280)
    8. UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildScript (System.Object context) (at Library/PackageCache/com.unity.addressables@1.16.6/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:275)
    9. UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at <8d21067e8d9c494db25a2b2485216e63>:0)
    I do not use the Addressable System at all (in fact I didn't even know what it is until today) - the only thing I use are string tables from the Localization.
    Is there anything I can try?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Localization uses Addressables. Are you able to share the project? Can you submit a bug report with it?
     
  5. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    I am afraid I cannot :(
    The folder size of my project is 5.4 GB.

    I think I have to replace Unity's localization solution with my own and just hope that the bug is gonna fixed in a future version.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Are you localizing assets or just strings?
     
  7. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    Only strings. I have 5 locales and one table collection. I clicked on each table header and selected "Preload All Tables" and "Preload Table" on the right side.
    Thats all I did with the localization system.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Oh I just noticed you are using 1.16.6 of Addressables. One thing to try is updating to the latest version by going into the package manager and adding the Addressables package 1.16.16 or newer. The version you have is from October but theres been a lot of fixes since then.
    Are you using 0.10.0 of the Localization package?
     
    Last edited: Feb 13, 2021
  9. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    I am using localization 0.9.0-preview (I added the line manually to manifest.json)

    I just upgraded Addressables to 1.16.6 and the InvalidCast error disappeared when I build the addressables (Window -> Asset Management -> Addressables -> Groups)!

    Unfortunately my app still crashes, but the errors are different this time:
    Code (CSharp):
    1. Exception encountered in operation CompletedOperation, status=Failed, result= : Dependency Exception
    2. UnityEngine.AddressableAssets.AddressablesImpl:LogException(AsyncOperationHandle, Exception)
    3. System.Action`2:Invoke(T1, T2)
    4. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception)
    5. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, String, Boolean)
    6. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
    7. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Start(ResourceManager, AsyncOperationHandle, DelegateList`1)
    8. UnityEngine.ResourceManagement.ResourceManager:StartOperation(AsyncOperationBase`1, AsyncOperationHandle)
    9. UnityEngine.ResourceManagement.ResourceManager:CreateCompletedOperationInternal(TObject, Boolean, String, Boolean)
    10. UnityEngine.ResourceManagement.<>c__DisplayClass83_0`1:<ProvideResources>b__1(AsyncOperationHandle)
    11. System.Func`2:Invoke(T)
    12. UnityEngine.ResourceManagement.ChainOperationTypelessDepedency`1:Execute()
    13. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
    14. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Start(ResourceManager, AsyncOperationHandle, DelegateList`1)
    15. UnityEngine.ResourceManagement.ResourceManager:StartOperation(AsyncOperationBase`1, AsyncOperationHandle)
    16. UnityEngine.ResourceManagement.ResourceManager:CreateChainOperationInternal(AsyncOperationHandle, Func`2, Boolean)
    17. UnityEngine.ResourceManagement.ResourceManager:ProvideResources(IList`1, Boolean, Action`1)
    18. UnityEngine.AddressableAssets.AddressablesImpl:LoadAssetsAsync(IList`1, Action`1, Boolean)
    19. UnityEngine.AddressableAssets.AddressablesImpl:LoadAssetsAsync(Object, Action`1, Boolean)
    20. UnityEngine.AddressableAssets.<>c__DisplayClass77_0`1:<LoadAssetsWithChain>b__0(AsyncOperationHandle)
    21. System.Func`2:Invoke(T)
    22. UnityEngine.ResourceManagement.ChainOperationTypelessDepedency`1:Execute()
    23. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
    24. System.Action`1:Invoke(T)
    25. UnityEngine.ResourceManagement.AsyncOperations.<>c__DisplayClass55_0:<add_CompletedTypeless>b__0(AsyncOperationHandle`1)
    26. System.Action`1:Invoke(T)
    27. DelegateList`1:Invoke(T)
    28. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    29. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, String, Boolean)
    30. UnityEngine.AddressableAssets.Initialization.<>c__DisplayClass16_0:<LoadContentCatalogInternal>b__0(AsyncOperationHandle`1)
    31. System.Action`1:Invoke(T)
    32. DelegateList`1:Invoke(T)
    33. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    34. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, String, Boolean)
    35. System.Action`1:Invoke(T)
    36. DelegateList`1:Invoke(T)
    37. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    38. UnityEngine.ResourceManagement.ResourceManager:ExecuteDeferredCallbacks()
    39. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    40. System.Action`1:Invoke(T)
    41. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    42. Exception encountered in operation ChainOperation<IList`1> - Dependencies, status=Failed, result= : ChainOperation of Type: System.Collections.Generic.IList`1[UnityEngine.Localization.Locale] failed because dependent operation failed
    43. Dependency Exception
    44. UnityEngine.AddressableAssets.AddressablesImpl:LogException(AsyncOperationHandle, Exception)
    45. System.Action`2:Invoke(T1, T2)
    46. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception)
    47. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, String, Boolean)
    48. System.Action`1:Invoke(T)
    49. DelegateList`1:Invoke(T)
    50. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    51. UnityEngine.ResourceManagement.ResourceManager:ExecuteDeferredCallbacks()
    52. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    53. System.Action`1:Invoke(T)
    54. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    55. Exception encountered in operation ChainOperation<IList`1> - InitializationOperation, status=Failed, result= : ChainOperation of Type: System.Collections.Generic.IList`1[UnityEngine.Localization.Locale] failed because dependent operation failed
    56. ChainOperation of Type: System.Collections.Generic.IList`1[UnityEngine.Localization.Locale] failed because dependent operation failed
    57. Dependency Exception
    58. UnityEngine.AddressableAssets.AddressablesImpl:LogException(AsyncOperationHandle, Exception)
    59. System.Action`2:Invoke(T1, T2)
    60. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:set_OperationException(Exception)
    61. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:Complete(TObject, Boolean, String, Boolean)
    62. System.Action`1:Invoke(T)
    63. DelegateList`1:Invoke(T)
    64. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    65. UnityEngine.ResourceManagement.ResourceManager:ExecuteDeferredCallbacks()
    66. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    67. System.Action`1:Invoke(T)
    68. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    69. No Locale could be selected:
    70. No Locales were available. Did you build the Addressables?
    71. The following (3) IStartupLocaleSelectors were used:
    72. UnityEngine.Localization.Settings.CommandLineLocaleSelector
    73. UnityEngine.Localization.Settings.SystemLocaleSelector
    74. UnityEngine.Localization.Settings.SpecificLocaleSelector
    75. UnityEngine.Localization.Settings.LocalizationSettings:SelectLocale()
    76. UnityEngine.Localization.Settings.LocalizationSettings:GetSelectedLocale()
    77. UnityEngine.Localization.Settings.LocalizationSettings:<GetSelectedLocaleAsync>b__59_0(AsyncOperationHandle)
    78. System.Func`2:Invoke(T)
    79. UnityEngine.ResourceManagement.ChainOperationTypelessDepedency`1:Execute()
    80. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeExecute()
    81. System.Action`1:Invoke(T)
    82. UnityEngine.ResourceManagement.AsyncOperations.<>c__DisplayClass55_0:<add_CompletedTypeless>b__0(AsyncOperationHandle`1)
    83. System.Action`1:Invoke(T)
    84. DelegateList`1:Invoke(T)
    85. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:InvokeCompletionEvent()
    86. UnityEngine.ResourceManagement.ResourceManager:ExecuteDeferredCallbacks()
    87. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    88. System.Action`1:Invoke(T)
    89.  
    90.  
    One line says
    Code (CSharp):
    1. No Locale could be selected:
    2. No Locales were available. Did you build the Addressables?
    so I guess somehow I still don't have the Addressables built correctly? Is there anything special I have to do for my string table?
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
  11. compyler

    compyler

    Joined:
    Mar 30, 2020
    Posts:
    94
    Indeed that solved it. Thanks!!!
     
    karl_jones likes this.
  12. marcuslelus

    marcuslelus

    Joined:
    Jun 18, 2018
    Posts:
    66
    I have the same problem but why can't I see the settings when I click on the localizations group in the Addressable Window ?
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    What do you see instead? Do you have the inspector window open and is it unlocked?
     
  14. marcuslelus

    marcuslelus

    Joined:
    Jun 18, 2018
    Posts:
    66
    I clicked on the group Localization-Locales and this is what I see. Same thing for the other grayed out groups
    Addressables 1.17.5-preview
    Localization package 0.10.0-preview

    I also tried with 1.16.16


    screen.png
     
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    The groups have lost their schemas. You will need to delete the group and then regenerate it by reimporting the localization assets.
     
  16. Bimaokai

    Bimaokai

    Joined:
    Jul 21, 2017
    Posts:
    19
    Hey. I have the issue, that when i add Localization, that my Standalone Build is starting, but not responding after the Unity Start Screen. In the Editor everything works fine. If i remove everything from Localization, the standalone build runs fine again. I have no errors or something that could help.
    I am using UNity 2020.3.18f1 and Localization package 1.0.3. I am having only one StringTable with two languages and only two keys.
    Don't know where to look anymore...
     
  17. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    What platform are you building to?
    Do you have WaitForCompletion enabled on your localized strings?
     
  18. Bimaokai

    Bimaokai

    Joined:
    Jul 21, 2017
    Posts:
    19
    Hi. I am building for Windows x86_64 and no i did not implement WaitForCompletion. I implemented like this:
    class member:

    public LocalizedString localeMsg = new LocalizedString() { TableReference = MyConstants.TABLE_INFO, TableEntryReference = MyConstants.INFO_TEXT_KEY };

    and then in the Method:
    msg = localeMsg.GetLocalizedString();
     
  19. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Get localized string calls wait for completion. Try using the async version. When do you call this?
     
  20. Bimaokai

    Bimaokai

    Joined:
    Jul 21, 2017
    Posts:
    19
    i try it with the Async Method. I am calling it right now in the Start() routine
     
  21. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Could you please file a bug report?
     
  22. Bimaokai

    Bimaokai

    Joined:
    Jul 21, 2017
    Posts:
    19
    I will do a bug report with constellation i had. Thank you very much for your help, i found a solution.
    I tried now the following with the StringTable and it works good and my Standalone build is running too:

    Two memeber variables:
    Code (CSharp):
    1. public LocalizedStringTable custInfoTable = new LocalizedStringTable() { TableReference = MyConstants.TABLE_CUSTOMER_INFO};
    2.         string msg = null;
    and then i used the following Methods:
    Code (CSharp):
    1. static string GetLocalizedString(StringTable table, string entryName)
    2.         {
    3.             // Get the table entry. The entry contains the localized string and Metadata
    4.             var entry = table.GetEntry(entryName);
    5.             return entry.GetLocalizedString(); // We can pass in optional arguments for Smart Format or String.Format here.
    6.         }
    7.  
    8.  
    9.         void LoadStrings(StringTable stringTable)
    10.         {
    11.             msg = GetLocalizedString(stringTable, MyConstants.CUSTOMER_INFO_TEXT_KEY);
    12.         }
    13.  
    14.         void OnEnable()
    15.         {
    16.             custInfoTable.TableChanged += LoadStrings;
    17.         }
    18.  
    19.         void OnDisable()
    20.         {
    21.             custInfoTable.TableChanged -= LoadStrings;
    22.         }
     
    karl_jones likes this.