From 1bc5bab70b7473c8fb8b674ff1dab8c959ed2dd8 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Sat, 13 Jul 2019 21:05:42 +0000 Subject: [PATCH] Minor fix for newer Unity versions. --- Scripts/Controls/TextPic.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Scripts/Controls/TextPic.cs b/Scripts/Controls/TextPic.cs index 693b43e..59c3e4f 100644 --- a/Scripts/Controls/TextPic.cs +++ b/Scripts/Controls/TextPic.cs @@ -638,9 +638,14 @@ namespace UnityEngine.UI.Extensions { usesNewRendering = false; if (Application.unityVersion.StartsWith("2019.1.")) { - int number = Convert.ToInt32(Application.unityVersion[7].ToString()); + if (!Char.IsDigit(Application.unityVersion[8])) { + int number = Convert.ToInt32(Application.unityVersion[7].ToString()); - if (number > 4) { + if (number > 4) { + usesNewRendering = true; + } + } + else { usesNewRendering = true; } }