Search Issue Tracker
Fixed
Votes
0
Found in [Package]
0.6.1-preview
Issue ID
LOC-83
Regression
No
Localization package LocalizedString value isn't set when calling the SetReference method using a string as TableEntryReference
How to reproduce:
1. Open the attached project (case-1230444.zip) and open the SampleScene
2. Select the GameObject
3. Enter the Play Mode
Expected result: the LocalizedString 'SomeString' attached to the GameObject gets set to 'NewTable/Entry1'
Actual result: the LocalizedString 'SomeString' attached to the GameObject remains a null
Reproducible with: 0.5.0-preview (2019.3.6f1, 2020.1.0b2, 2020.2.0a5), 0.6.0-preview (2019.3.6f1, 2020.1.0b2, 2020.2.0a5), 0.6.1-preview (2019.3.6f1, 2020.1.0b2, 2020.2.0a5)
Could not test with: 2017.4.38f1, 2018.4.20f1 (package unavailable)
Workaround: the issue seems to be a bad if statement in the SerializedTableEntryReference.cs. Changing if (string.IsNullOrEmpty(keyName)) to if (!string.IsNullOrEmpty(keyName)) fixes the issue.The Script is located here: ProjectFolder\\Library\\PackageCache\\com.unity.localization@0.6.1-preview\\Editor\\UI\Tables
Notes:
1. About the project setup: the GameObject has 2 Script Components. SomeAsset.cs Script only has a LocalizedString value. Test.cs Script has a reference to the SomeAsset class and tries to set its field by calling the method SetReference. There's also A Localization String Table created which has an Entry called 'Entry1'
2. Packages 0.4.0-preview and below do not have the SerializedTableEntryReference.cs Script implemented
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Highlighter.Highlight does not find window when using class name as window title
- Highlighter.Highlight highlights a different component when multiple components have the same property path
- Highlighter.Highlight does not find elements in an array or list when the array or list is collapsed
- [URP][NRP] RenderPass, BeginSubPass, and EndRenderPass errors are thrown when Native RenderPass is enabled
- D3D11 swapchain error pop-up appears and the Editor shuts down when Generating Lighting with Probe Volumes present
Add comment