Search Unity

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

Bug TMP Sprite Asset resets at unity launch

Discussion in 'UGUI & TextMesh Pro' started by Whatever560, Mar 20, 2023.

  1. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    470
    Hi,
    It's the first time I'm encoutering this for the last few years. I created a new Sprite Asset the way I do usualy but whenever I launch unity it keeps reseting to an empty state.

    I need to press "Update Sprite asset" each time to have the Sprite Tables populated.

    Any idea what could be going on ?

    Thanks.
     
  2. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    470
    It was systemically happening. I deleted the file and created a sprite asset again from the sprite sheet. The behaviours does not seem to reproduce anymore.
     
  3. Whatever560

    Whatever560

    Joined:
    Jan 5, 2016
    Posts:
    470
    It happens again.
    @Stephan_B Sorry to ping you on this but it is quite a critical moment on the project lifetime and this makes for a lot of lost time. Any insight on why a Sprite asset would not serialize and/or reset itself ?

    As you can see the saved sprite asset tables are empty even after we pressed "Updated Sprite asset" and that it was correctly populated. When deleting and recreating the sprite asset it seems to be working again.

    Unity LTS 2021.3.19 and TMP 3.0.6

    Code (CSharp):
    1. %YAML 1.1
    2. %TAG !u! tag:unity3d.com,2011:
    3. --- !u!114 &11400000
    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: 0}
    10.   m_Enabled: 1
    11.   m_EditorHideFlags: 0
    12.   m_Script: {fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281, type: 3}
    13.   m_Name: PortraitSprites
    14.   m_EditorClassIdentifier:
    15.   hashCode: -1798582227
    16.   material: {fileID: 8069939188130839121}
    17.   materialHashCode: 0
    18.   m_Version: 1.1.0
    19.   m_FaceInfo:
    20.     m_FaceIndex: 0
    21.     m_FamilyName:
    22.     m_StyleName:
    23.     m_PointSize: 0
    24.     m_Scale: 0
    25.     m_UnitsPerEM: 0
    26.     m_LineHeight: 0
    27.     m_AscentLine: 0
    28.     m_CapLine: 0
    29.     m_MeanLine: 0
    30.     m_Baseline: 0
    31.     m_DescentLine: 0
    32.     m_SuperscriptOffset: 0
    33.     m_SuperscriptSize: 0
    34.     m_SubscriptOffset: 0
    35.     m_SubscriptSize: 0
    36.     m_UnderlineOffset: 0
    37.     m_UnderlineThickness: 0
    38.     m_StrikethroughOffset: 0
    39.     m_StrikethroughThickness: 0
    40.     m_TabWidth: 0
    41.   spriteSheet: {fileID: 2800000, guid: 2510f865d97ab9442905a3761bff0751, type: 3}
    42.   m_SpriteCharacterTable: []
    43.   m_SpriteGlyphTable: []
    44.   spriteInfoList: []
    45.   fallbackSpriteAssets: []
    46. --- !u!21 &8069939188130839121
    47. Material:
    48.   serializedVersion: 8
    49.   m_ObjectHideFlags: 1
    50.   m_CorrespondingSourceObject: {fileID: 0}
    51.   m_PrefabInstance: {fileID: 0}
    52.   m_PrefabAsset: {fileID: 0}
    53.   m_Name: TextMeshPro/Sprite
    54.   m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3}
    55.   m_ValidKeywords: []
    56.   m_InvalidKeywords: []
    57.   m_LightmapFlags: 4
    58.   m_EnableInstancingVariants: 0
    59.   m_DoubleSidedGI: 0
    60.   m_CustomRenderQueue: -1
    61.   stringTagMap: {}
    62.   disabledShaderPasses: []
    63.   m_SavedProperties:
    64.     serializedVersion: 3
    65.     m_TexEnvs:
    66.     - _MainTex:
    67.         m_Texture: {fileID: 2800000, guid: 2510f865d97ab9442905a3761bff0751, type: 3}
    68.         m_Scale: {x: 1, y: 1}
    69.         m_Offset: {x: 0, y: 0}
    70.     m_Ints: []
    71.     m_Floats:
    72.     - _ColorMask: 15
    73.     - _CullMode: 0
    74.     - _Stencil: 0
    75.     - _StencilComp: 8
    76.     - _StencilOp: 0
    77.     - _StencilReadMask: 255
    78.     - _StencilWriteMask: 255
    79.     - _UseUIAlphaClip: 0
    80.     m_Colors:
    81.     - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
    82.     - _Color: {r: 1, g: 1, b: 1, a: 1}
    83.   m_BuildTextureStacks: []
    upload_2023-4-5_18-42-36.png
     

    Attached Files:

    Last edited: Apr 5, 2023
  4. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    470
    Last edited: Jul 11, 2023