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 ScrollRect overflow with rich text enabled exception

Discussion in 'UGUI & TextMesh Pro' started by zsemberi-daniel, Jul 18, 2017.

  1. zsemberi-daniel

    zsemberi-daniel

    Joined:
    Dec 14, 2016
    Posts:
    3
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. TMPro.TMP_Text.FillCharacterVertexBuffers (System.Int32 i, System.Int32 index_X4) (at <454f2973f89348aa975b66532b873929>:0)
    3. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    4. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    5. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    6. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    7. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    8. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    9. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    10. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    11. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    12. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    13. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    14. TMPro.TextMeshProUGUI.GenerateTextMesh () (at <454f2973f89348aa975b66532b873929>:0)
    15. TMPro.TextMeshProUGUI.OnPreRenderCanvas () (at <454f2973f89348aa975b66532b873929>:0)
    16. TMPro.TextMeshProUGUI.Rebuild (UnityEngine.UI.CanvasUpdate update) (at <454f2973f89348aa975b66532b873929>:0)
    17. UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/CanvasUpdateRegistry.cs:150)
    18. UnityEngine.UI.ScrollRect:LateUpdate()
    19.  
    I get this exception in the editor when I have the following setup: a panel with a ScrollRect (viewport set to itself, content set to it's child) and a Mask. It has the TextMesh Pro text as it's children with Rich Text and Auto Size enabled. Also the Wrapping & Overflow is set to Scroll Rect. After this we start the game and the text is not visible with this exception.
     
  2. zsemberi-daniel

    zsemberi-daniel

    Joined:
    Dec 14, 2016
    Posts:
    3
    Forgot to add that I'm using the 2017.1.0f3 Unity update and the 1.0.55.2017.1.0b11 TextMesh Pro update.
     
  3. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Can you send me a PM with a link to a Repro of this setup so I can easily reproduce the behavior and error?