Code cleanup.
This commit is contained in:
@@ -4,10 +4,19 @@ namespace Cryville.Common.Unity {
|
||||
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
|
||||
System.Diagnostics.Process.Start(url);
|
||||
#elif UNITY_ANDROID
|
||||
UnityEngine.AndroidJNI.AttachCurrentThread();
|
||||
using (var clazz = new UnityEngine.AndroidJavaClass("world.cryville.common.unity.UrlOpener")) {
|
||||
clazz.CallStatic("open", url);
|
||||
}
|
||||
#else
|
||||
#error Unknown platform.
|
||||
#endif
|
||||
}
|
||||
public static void OpenThreaded(string url) {
|
||||
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN
|
||||
Open(url);
|
||||
#elif UNITY_ANDROID
|
||||
UnityEngine.AndroidJNI.AttachCurrentThread();
|
||||
Open(url);
|
||||
UnityEngine.AndroidJNI.DetachCurrentThread();
|
||||
#else
|
||||
#error Unknown platform.
|
||||
|
@@ -344,7 +344,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
else {
|
||||
var itv = ((InputVectorSrc)tv).Get();
|
||||
if (!hfv || _vecs[pid] != itv) _vecs[pid] = itv;
|
||||
if (!hfv || ifv != itv) _vecs[pid] = itv;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -90,7 +90,7 @@ namespace Cryville.Crtr.Network {
|
||||
if (totalDiffSize == 0 || totalDiffSize >= fullPackage.size) {
|
||||
// TODO Check if external
|
||||
if (Dialog.ShowAndWait(string.Format("A new version is available: {0}\nYou have to download the full package.\nOpen the download link now?", latestVersion.name), "Yes", "No") == 0) {
|
||||
UrlOpener.Open(fullPackage.url);
|
||||
UrlOpener.OpenThreaded(fullPackage.url);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user