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

TMP Button not working in LWRP

Discussion in 'UGUI & TextMesh Pro' started by JJ_FX, Oct 20, 2019.

  1. JJ_FX

    JJ_FX

    Joined:
    Mar 19, 2015
    Posts:
    76
    Hi,

    I just added LWRP to my project. After done that all my UI TMP Buttons dont display any text. Regular Buttons displays text as expected. TMP Object seams to be working fine. But once I add TMP to the button it does not display any text.

    But I get those errors while working in Shadergraph. However they all call for GUILayout. I don't know if that's relevant to the issue, as other things seams to be working just fine

    Code (CSharp):
    1. ArgumentException: GUILayout: Mismatched LayoutGroup.repaint
    2. UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:311)
    3. UnityEngine.GUILayout.BeginScrollView (UnityEngine.Vector2 scrollPosition, System.Boolean alwaysShowHorizontal, System.Boolean alwaysShowVertical, UnityEngine.GUIStyle horizontalScrollbar, UnityEngine.GUIStyle verticalScrollbar, UnityEngine.GUIStyle background, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:360)
    4. UnityEngine.GUILayout.BeginScrollView (UnityEngine.Vector2 scrollPosition, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:349)
    5. UnityEditor.ShaderInspector.ShaderErrorListUI (UnityEngine.Object shader, UnityEditor.ShaderMessage[] messages, UnityEngine.Vector2& scrollPosition) (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:203)
    6. UnityEditor.ShaderInspector.ShowShaderErrors (UnityEngine.Shader s) (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:323)
    7. UnityEditor.ShaderInspector.ShowShaderCodeArea (UnityEngine.Shader s) (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:178)
    8. UnityEditor.ShaderInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Editor/Mono/Inspector/ShaderInspector.cs:106)
    9. UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
    10. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
    Last edited: Oct 20, 2019
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of TMP are you using?

    Surface shaders do not work with SRP. As such if your buttons were using the Distance Field Surface shaders, that will be an issue.
     
  3. JJ_FX

    JJ_FX

    Joined:
    Mar 19, 2015
    Posts:
    76
    Im using default TMP shaders, didn't customize anything
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    What version of Unity are you running?

    What version of TMP?

    None of the errors above appear to be specific or reference TMP. Do you get the same behavior in a new project using the latest version of TMP which is 1.5.0-preview.1 for Unity 2018.4 or 2.1.0-preview.1 for Unity 2019.x or newer?

    For testing, be sure to import the TMP Essential Resources from those latest release of TMP.

    If you are able to reproduce these errors / behavior in a new project, please provide me with the steps or simply submit a bug report and then provide me with the Case # once you have it.