Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

"Unsupported type LocalizedString" while changing unrelated inspector values

Discussion in 'Localization Tools' started by geordiemhall, Jan 27, 2021.

  1. geordiemhall

    geordiemhall

    Joined:
    Jun 6, 2020
    Posts:
    20
    Hey there,

    Couldn't find a known issue for this so thought would post in case there's an obvious solution (not sure if I'm doing something unexpected or if it's a bug in the localization package).

    I haven't narrowed down exactly what conditions are needed, but sometimes changing values in an object's inspector (eg. an object that has a LocalizedString property, but I'm changing an unrelated "Color" property) will print out a lot of logs like:

    Code (csharp):
    1. Unsupported type LocalizedString
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    3.  
    Not sure if it's because LocalizedString isn't meant to be serialized (though it has a custom property drawer so surely it is...), or if something else is going on. Any ideas would be appreciated!

    Cheers,
    Geordie
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    No I have never seen this one. Is it coming from a script you have that uses the LocalizedString?
     
  3. geordiemhall

    geordiemhall

    Joined:
    Jun 6, 2020
    Posts:
    20
    Hard to tell, haven't narrowed down exactly which prefabs/SO actually cause the logs (can't seem to get it to happen again, though have seen it on multiple machines in the past).

    I did a text search of our project for "Unsupported type" and couldn't find anything, so seems unlikely it's something we're doing, although I did find a few references when searching the Unity CS Reference source (though couldn't immediately see how any would bubble up to that exact error log).

    Will try to keep an eye out for the next time it happens so can try to actually repro properly
     
    karl_jones likes this.
  4. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Getting this as well, red error in console but game runs fine in the editor without errors.
    Seems to be related to having a script with a LocalizedString definition, but it compiles and the localization works just fine.
    The error message only says "UnityEditor.EditorApplication.Internal_CallGlobalEventHandler()" with no line number or anything.
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    Could you please file a bug report? We don't currently have any reproduction for this bug.
     
  6. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    I will see if I can reproduce it in a minimal project, the one I'm having it in right now is huge.
     
    karl_jones likes this.
  7. Tom163

    Tom163

    Joined:
    Nov 30, 2007
    Posts:
    1,290
    Just a quick update: I have not yet been able to reproduce this in a small project.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    Can you share the log file from the editor when the issue happened?
     
  9. HaSa1002

    HaSa1002

    Joined:
    Feb 12, 2020
    Posts:
    1
    I had a similar issue and was able to repro it reliably. I filed a bug report (IN-50574)

    Code (Boo):
    1. Unsupported type LocalizedString
    2. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    3. UnityEditor.Localization.UI.LocalizedReferencePicker`1<UnityEditor.Localization.StringTableCollection>:SetItem (UnityEditor.Localization.LocalizationTableCollection,UnityEngine.Localization.Tables.SharedTableData/SharedTableEntry,bool) (at ./Library/PackageCache/com.unity.localization@1.4.4/Editor/UI/Localized Reference/LocalizedReferencePicker.cs:78)
    4. UnityEditor.Localization.UI.LocalizedReferencePicker`1<UnityEditor.Localization.StringTableCollection>:Track (UnityEditor.Search.SearchItem) (at ./Library/PackageCache/com.unity.localization@1.4.4/Editor/UI/Localized Reference/LocalizedReferencePicker.cs:66)
    5. UnityEditor.Search.QuickSearch:DelayTrackSelection ()
    6. UnityEditor.EditorApplication:Internal_CallDelayFunctions ()
    7.  
    8. [./Library/PackageCache/com.unity.localization@1.4.4/Editor/UI/Localized Reference/LocalizedReferencePicker.cs line 66]
    9.  
    10. Unsupported type LocalizedString
    11. TrimDiskCacheJob: Current cache size 1mb
    12. Unsupported type LocalizedString
    13. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    14. UnityEditor.Localization.UI.LocalizedReferencePicker`1<UnityEditor.Localization.StringTableCollection>:SetItem (UnityEditor.Localization.LocalizationTableCollection,UnityEngine.Localization.Tables.SharedTableData/SharedTableEntry,bool) (at ./Library/PackageCache/com.unity.localization@1.4.4/Editor/UI/Localized Reference/LocalizedReferencePicker.cs:78)
    15. UnityEditor.Localization.UI.LocalizedReferencePicker`1<UnityEditor.Localization.StringTableCollection>:Select (UnityEditor.Search.SearchItem,bool) (at ./Library/PackageCache/com.unity.localization@1.4.4/Editor/UI/Localized Reference/LocalizedReferencePicker.cs:57)
    16. UnityEditor.Search.QuickSearch:<get_selectCallback>b__61_0 (UnityEditor.Search.SearchItem,bool)
    17. UnityEditor.Search.QuickSearch:OnDisable ()
    18. UnityEditor.Search.SearchPickerWindow:OnDisable ()
    19. UnityEditor.HostView:OnDestroy ()
    20. UnityEditor.ContainerWindow:InternalCloseWindow ()
    21.  
    22. [./Library/PackageCache/com.unity.localization@1.4.4/Editor/UI/Localized Reference/LocalizedReferencePicker.cs line 57]
    23.  
    24. Unsupported type LocalizedString
     
    karl_jones likes this.
  10. slippyfrog

    slippyfrog

    Joined:
    Jan 18, 2016
    Posts:
    42
    I'm seeing this one as well. I believe it has to do with using Generics and Serialization.
    upload_2023-8-15_20-52-6.png


    ObservableField is a generic class that takes any type. I pass in primitives, GameObjects subclasses of Monobehaviors as the type parameter.

    The objects serialize correctly but I get these errors arbitrarily while running the game from editor.
     
  11. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147
    I'm not sure what could be causing the issue. Could you please file a bug report?
     
  12. Wrymnn

    Wrymnn

    Joined:
    Sep 24, 2014
    Posts:
    368
    Same issue in our project, using Unity 2022.3.14f1 LTS
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,147