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
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
Add comment