Search Issue Tracker

Fixed

Votes

0

Found in [Package]

0.8.0-preview

Issue ID

LOC-118

Regression

Yes

NullReferenceException thrown when editing a LocalizedString linked to a collection that does not have a table for every project locale.

Package: Localization

-

If a table collection is missing a table for one of the project locales then a NullReferenceException will be thrown by the LocalizedString property drawer.

1) Create a new string table collection for some but not all of the project locales
2) Add A UGUI Text GameObject and click the Localize option
3) Select the new table collection. Exceptions will be thrown in the editor

{code:c#}
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Localization.UI.LocalizedStringPropertyDrawer+StringPropertyData.Init (UnityEditor.SerializedProperty property) (at C:/Unity/Packages/com.unity.localization/Packages/com.unity.localization/Editor/UI/Localized Reference/LocalizedStringPropertyDrawer.cs:125)
UnityEditor.Localization.UI.LocalizedReferencePropertyDrawer`1[TCollection].GetDataForProperty (UnityEditor.SerializedProperty property) (at C:/Unity/Packages/com.unity.localization/Packages/com.unity.localization/Editor/UI/Localized Reference/LocalizedReferencePropertyDrawer.cs:251)
UnityEditor.Localization.UI.PropertyDrawerExtended`1[TData].GetPropertyHeight (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/Unity/Packages/com.unity.localization/Packages/com.unity.localization/Editor/UI/Utility/PropertyDrawerExtended.cs:38)
UnityEditor.Localization.UI.LocalizeStringEditor.OnInspectorGUI () (at C:/Unity/Packages/com.unity.localization/Packages/com.unity.localization/Editor/UI/Components/LocalizeStringEditor.cs:42)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <8004fcc221b54f98ba547350ea71d812>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

{code}

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.