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

TextMesh Pro TMPro prev8: Editor _CullMode/Material errs

Discussion in 'UGUI & TextMesh Pro' started by MrLucid72, Mar 19, 2020.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Every time I interact with UGUI's in preview8, I get this:

    upload_2020-3-19_19-37-44.png

    If I just toggle active in editor, it'll spam this about 3x each~ I don't believe this happened in prev4, to compare:
    Code (CSharp):
    1. Material doesn't have a float or range property '_CullMode'
    2. UnityEngine.Material:GetFloat(String) (at ?)
    3. TMPro.TMP_SubMeshUI:UpdateMaterial() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMP_SubMeshUI.cs:701)
    4. TMPro.TMP_SubMeshUI:SetMaterialDirty() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMP_SubMeshUI.cs:609)
    5. TMPro.TMP_SubMeshUI:RecalculateMasking() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMP_SubMeshUI.cs:735)
    6. TMPro.TMP_SubMeshUI:OnEnable() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMP_SubMeshUI.cs:269)
    7. UnityEngine.Behaviour:set_enabled(Boolean) (at ?)
    8. TMPro.TextMeshProUGUI:SetActiveSubMeshes(Boolean) (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMPro_UGUI_Private.cs:4529)
    9. TMPro.TextMeshProUGUI:OnEnable() (at Library/PackageCache/com.unity.textmeshpro@2.1.0-preview.8/Scripts/Runtime/TMPro_UGUI_Private.cs:168)
    10. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler() (at ?)
    It's likely a Unicode issue~
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    A new cull property was added in the Material Inspector to provide control over culling. As such the Shaders were updated and also moved outside of the Resources folder to prevent all of them from being always included in a build.

    You will need to import the updated shaders. You can also chose to manually move them together in the "TextMesh Pro/Shaders/...." folder.

    New Structure
    upload_2020-3-19_11-45-40.png
     
  3. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Thanks - how do I import the new shaders?
    EDIT: Nvm, got it! Seems like it was Window >> TMP >> Import Essential Resources.
    EDIT 2: Doh, overrode styles or something - getting some index out of range err for styles. I'll see what's up.
    EDIT 3: Ok, JUST imported shaders and unchecked the rest.
     
    Last edited: Mar 20, 2020
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Among the billion things I need to do, I need to make it so that re-importing the TMP Essential Resources doesn't replace / override the existing ones.
     
  5. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Oof, I don't think just importing the shaders was enough:

    upload_2020-3-20_15-59-22.png
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Use Import TMP Essential Resources and see in the import window what is potentially missing.
     
  7. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Ok yeah, just cutting + pasting the /resources/shaders to ../shaders seemed to be safest for me. That was pretty confusing - may want to have a way to detect if the new shaders dir exists then copy it from resources shaders if exists~ for future folks.
     
  8. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    If curious what still shows AFTER I manually cut+paste the shaders to the new shaders spot (I didn't import anything else seen below - a bit nervous):

    upload_2020-3-20_16-4-28.png

    EDIT: I could probably import the "NEW" items without worry. However, which would be safe to override?
     
  9. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    You most definitely want to import the updated <new> shaders as those are the ones with the support for the new Cull mode.

    The Default Style Sheet might override your so verify first and the same for the TMP Settings.

    The LiberationSans is updated with dynamic fallback assigned to it so unless you modified yours that should be fine to import over the old one.
     
    MrLucid72 likes this.