Search Issue Tracker
Fixed
Fixed in 1.2.1
Votes
0
Found in [Package]
1.0.5
Issue ID
LOC-509
Regression
No
Setting an existing persistent variable with LocalizedString operator [] throws exception if item already exists.
https://forum.unity.com/threads/nested-localizedstrings-dont-seem-to-work.1203964/#post-7690903
Using
NewItemUnlocked["my-nested-string"] = new LocalizedString();
will throw an exception if the item is already added.
using UnityEngine;
using UnityEngine.Localization;
using UnityEngine.Localization.Components;
public class TestLocalized : MonoBehaviour
{
public LocalizeStringEvent Localizer;
public LocalizedString NewItemUnlocked;
public LocalizedString ItemName;
void Start()
{
NewItemUnlocked.Add("my-nested-string", ItemName);
NewItemUnlocked["my-nested-string"] = new LocalizedString(); // Will throw
}
}
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Matching Selectors list not updating correctly with element's pseudo-state updates
- [Android] Crash on vendor/lib64/egl/libGLES_mali.so when Graphics Jobs(Experimental) is disabled and the Player is running on the Google Pixel 6 with the March security patch installed
- Profiler does not profile after building the Project with Autoconnect Profiler Option enabled
- Editor slows down when selecting a script with the [HideInInspector] attribute on arrays with dynamic values
- [XR] Custom Pass not working as intended with Single Pass Instanced when XR is initialized after runtime start
Add comment