Skip to content

Commit 768d502

Browse files
authored
Fixes #43
1 parent 56b1d99 commit 768d502

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/VersionHandler/src/VersionHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using UnityEditor;
1919
using System.Collections;
2020
using System.Collections.Generic;
21+
using System.Globalization;
2122
using System.IO;
2223
using System.Reflection;
2324
using System;
@@ -165,7 +166,7 @@ static float GetUnityVersionMajorMinor() {
165166
if (!string.IsNullOrEmpty(version)) {
166167
int dotIndex = version.IndexOf('.');
167168
if (dotIndex > 0 && version.Length > dotIndex + 1) {
168-
if (!float.TryParse(version.Substring(0, dotIndex + 2), out result)) {
169+
if (!float.TryParse(version.Substring(0, dotIndex + 2), NumberStyles.Any, CultureInfo.InvariantCulture, out result)) {
169170
result = 5.4f;
170171
}
171172
}

0 commit comments

Comments
 (0)