From 093fb53ccafa19d1b339b682e459efa6a5a1ce09 Mon Sep 17 00:00:00 2001 From: Unity Technologies <@unity.com> Date: Wed, 22 Apr 2020 00:00:00 +0200 Subject: [PATCH] com.unity.textmeshpro@3.0.0-preview.11 ## [3.0.0-preview.11] - 2020-04-22 --- CHANGELOG.md | 7 +++++++ Scripts/Runtime/TMPro_UGUI_Private.cs | 4 +++- Scripts/Runtime/TextMeshProUGUI.cs | 5 +++++ package.json | 6 +++--- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66bc5cd..0c8b61f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog These are the release notes for the TextMesh Pro UPM package which was first introduced with Unity 2018.1. Please see the following link for the Release Notes for prior versions of TextMesh Pro. http://digitalnativestudios.com/forum/index.php?topic=1363.0 +## [3.0.0-preview.11] - 2020-04-22 +## [2.1.0-preview.11] +## [1.5.0-preview.11] +### Changes +- Fixed incorrect culling of text object by RectMask2D component when the parent Canvas Render Mode is set to Screen Space - Camera or World Space. Case #1240595 +- Added special handling to ForceMeshUpdate() when the parent Canvas is disabled. + ## [3.0.0-preview.10] - 2020-04-21 ## [2.1.0-preview.10] ## [1.5.0-preview.10] diff --git a/Scripts/Runtime/TMPro_UGUI_Private.cs b/Scripts/Runtime/TMPro_UGUI_Private.cs index 4bc0fdd..f89fd1e 100644 --- a/Scripts/Runtime/TMPro_UGUI_Private.cs +++ b/Scripts/Runtime/TMPro_UGUI_Private.cs @@ -4499,7 +4499,9 @@ internal override Rect GetCanvasSpaceClippingRect() Transform rootCanvasTransform = m_canvas.rootCanvas.transform; Bounds compoundBounds = GetCompoundBounds(); - return new Rect(rootCanvasTransform.InverseTransformPoint(m_rectTransform.position + compoundBounds.min), compoundBounds.size); + Vector3 position = rootCanvasTransform.InverseTransformPoint(m_rectTransform.position); + + return new Rect(position + compoundBounds.min, compoundBounds.size); } diff --git a/Scripts/Runtime/TextMeshProUGUI.cs b/Scripts/Runtime/TextMeshProUGUI.cs index 5a9262e..ce120b7 100644 --- a/Scripts/Runtime/TextMeshProUGUI.cs +++ b/Scripts/Runtime/TextMeshProUGUI.cs @@ -505,6 +505,11 @@ public override void ForceMeshUpdate(bool ignoreActiveState = false, bool forceT m_havePropertiesChanged = true; m_ignoreActiveState = ignoreActiveState; m_isInputParsingRequired = m_isInputParsingRequired ? true : forceTextReparsing; + + // Special handling in the event the Canvas is only disabled + if (m_canvas == null) + m_canvas = GetComponentInParent(); + OnPreRenderCanvas(); } diff --git a/package.json b/package.json index d0c772e..debe7a8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.textmeshpro", "displayName": "TextMeshPro", - "version": "3.0.0-preview.10", + "version": "3.0.0-preview.11", "unity": "2020.1", "unityRelease": "0a10", "description": "TextMeshPro is the ultimate text solution for Unity. It's the perfect replacement for Unity's UI Text and the legacy Text Mesh.\n\nPowerful and easy to use, TextMeshPro (also known as TMP) uses Advanced Text Rendering techniques along with a set of custom shaders; delivering substantial visual quality improvements while giving users incredible flexibility when it comes to text styling and texturing.\n\nTextMeshPro provides Improved Control over text formatting and layout with features like character, word, line and paragraph spacing, kerning, justified text, Links, over 30 Rich Text Tags available, support for Multi Font & Sprites, Custom Styles and more.\n\nGreat performance. Since the geometry created by TextMeshPro uses two triangles per character just like Unity's text components, this improved visual quality and flexibility comes at no additional performance cost.", @@ -19,9 +19,9 @@ "repository": { "type": "git", "url": "https://github.cds.internal.unity3d.com/unity/com.unity.textmeshpro.git", - "revision": "ad62184afe13f86a70ec0d3efa0f57005d29a5f0" + "revision": "611e4741c84953dfa38d98ff986d9bfbc2bc362c" }, "upmCi": { - "footprint": "7ed97fe0244f1ebbbe679d814b1b080b7611b2ab" + "footprint": "7bf1d28e389855c532b7f2c9f4573dc7f0bdd95d" } }