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
- Light is not applied properly to Terrain Details when using Light Layers
- Opening reference for XR component redirects to a missing page
- [Android]Crash on PersistentManager::GlobalToLocalSerializedFileIndex(SerializedObjectIdentifier const&) when building the Android Player
- [Android] The Video Player stops playing at different points when Skip On Drop is enabled
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
Add comment