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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Add comment