Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Unifont glyphs not shown in inspector but work in editor

Discussion in 'Editor & General Support' started by CrandellWS, Feb 24, 2021.

  1. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    I read through another topic that says unicodes are not supported in c# but whatever...

    https://answers.unity.com/questions/170109/is-there-any-way-to-display-unicode-characters.html

    ----------

    So I am looking at the scene and the inspector for an asset i purchased (OSK https://assetstore.unity.com/packages/tools/integration/osk-on-screen-keyboard-77689)

    ----------

    There are several demo scenes where unicode images are shown even when the `play mode` has not been enabled. What is so confusing is that the actual text input is blank but it still shows the gear icon...

    I even added another text input and just copied the values of the first and again it shows the gear but there is nothing in the input...

    I can change it from an icon to text but can not seem to understand where or how to set the icon

    ----------

    In the screenshot you can see the text input is empty but the gear icon is clearly visible...

    upload_2021-2-24_11-10-22.png

    ----------

    I double checked and no scripts take any action on newly created text input.

    ----------

    I am so confused someone please help
     
  2. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    where else could this data be coming from?
     
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
  4. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    It is not a Gizmo it is using unifont glyphs

    update I can simply copy and paste the glyphs directly into the inspector but they do show as empty even though it works...

    I think this warrants a bug report...

    I found that if I made a blank scene and saved 2 text fields one copied the other saying WTF and I open that scene in a text editor it shows the m_text value is set as follows notice quotes on text (1):
    text (1) = "\uE9D4"
    text (2) = WTF

    upload_2021-2-25_9-59-45.png

    here is the relevant code from the scene file:

    Text (1)
    Code (csharp):
    1.  
    2. --- !u!114 &7580859321234613476
    3. MonoBehaviour:
    4.   m_ObjectHideFlags: 0
    5.   m_CorrespondingSourceObject: {fileID: 0}
    6.   m_PrefabInstance: {fileID: 0}
    7.   m_PrefabAsset: {fileID: 0}
    8.   m_GameObject: {fileID: 5951462421636265840}
    9.   m_Enabled: 1
    10.   m_EditorHideFlags: 0
    11.   m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
    12.   m_Name:
    13.   m_EditorClassIdentifier:
    14.   m_Material: {fileID: 0}
    15.   m_Color: {r: 1, g: 1, b: 1, a: 1}
    16.   m_RaycastTarget: 1
    17.   m_Maskable: 1
    18.   m_OnCullStateChanged:
    19.     m_PersistentCalls:
    20.       m_Calls: []
    21.   m_FontData:
    22.     m_Font: {fileID: 12800000, guid: 8d5447b0a77949445a4fccd1aa4b5844, type: 3}
    23.     m_FontSize: 26
    24.     m_FontStyle: 0
    25.     m_BestFit: 0
    26.     m_MinSize: 10
    27.     m_MaxSize: 40
    28.     m_Alignment: 4
    29.     m_AlignByGeometry: 0
    30.     m_RichText: 1
    31.     m_HorizontalOverflow: 0
    32.     m_VerticalOverflow: 0
    33.     m_LineSpacing: 1
    34.   m_Text: "\uE9D4"
    35.  
    Text (2)
    Code (csharp):
    1.  
    2.  
    3. --- !u!114 &2011339314
    4. MonoBehaviour:
    5.   m_ObjectHideFlags: 0
    6.   m_CorrespondingSourceObject: {fileID: 0}
    7.   m_PrefabInstance: {fileID: 0}
    8.   m_PrefabAsset: {fileID: 0}
    9.   m_GameObject: {fileID: 2011339312}
    10.   m_Enabled: 1
    11.   m_EditorHideFlags: 0
    12.   m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
    13.   m_Name:
    14.   m_EditorClassIdentifier:
    15.   m_Material: {fileID: 0}
    16.   m_Color: {r: 1, g: 1, b: 1, a: 1}
    17.   m_RaycastTarget: 1
    18.   m_Maskable: 1
    19.   m_OnCullStateChanged:
    20.     m_PersistentCalls:
    21.       m_Calls: []
    22.   m_FontData:
    23.     m_Font: {fileID: 12800000, guid: 8d5447b0a77949445a4fccd1aa4b5844, type: 3}
    24.     m_FontSize: 26
    25.     m_FontStyle: 0
    26.     m_BestFit: 0
    27.     m_MinSize: 10
    28.     m_MaxSize: 40
    29.     m_Alignment: 4
    30.     m_AlignByGeometry: 0
    31.     m_RichText: 1
    32.     m_HorizontalOverflow: 0
    33.     m_VerticalOverflow: 0
    34.     m_LineSpacing: 1
    35.   m_Text: WTF
    36.  
    37.  
    I figure there has to be a way to set that value via the inspector but can not seem to figure out how. see update above i figured out how
     
    Last edited: Feb 25, 2021
  5. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    bug 1317446
     
  6. CrandellWS

    CrandellWS

    Joined:
    Oct 31, 2015
    Posts:
    178
    I know it is only a corner case issue and how to work around it but can I get some feedback one way or the other on if this will be fixed? Allowing unifont glyphs to be seen in the inspector