Minor fix for newer Unity versions.

pull/413/head
Brad Nelson 2019-07-13 21:05:42 +00:00
parent 1dc2b604e2
commit 1bc5bab70b
1 changed files with 7 additions and 2 deletions

View File

@ -638,6 +638,7 @@ namespace UnityEngine.UI.Extensions {
usesNewRendering = false;
if (Application.unityVersion.StartsWith("2019.1.")) {
if (!Char.IsDigit(Application.unityVersion[8])) {
int number = Convert.ToInt32(Application.unityVersion[7].ToString());
if (number > 4) {
@ -647,6 +648,10 @@ namespace UnityEngine.UI.Extensions {
else {
usesNewRendering = true;
}
}
else {
usesNewRendering = true;
}
#endif
base.OnEnable();