修改细节

This commit is contained in:
Caiyanpeng committed 2021-10-13 19:03:22 +08:00
1 parent d8adb8a5b8
commit 3c540dece4
9 files changed
+1028 -990

No files matched your search

@@ -55,7 +55,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
#if UNITY_ANDROID
var info = r.data.Value<JObject>("UnityApk");
Debug.Log(info.Value<string>("Version"));
if (info.Value<string>("Version") != App.AppVersion)
if (Utils.isUpdate(App.AppVersion, info.Value<string>("Version")))
{
transform.Find("Panel").gameObject.SetActive(false);
transform.Find("Version").gameObject.SetActive(false);
@@ -63,7 +63,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
}
#elif UNITY_IOS
var info = r.data.Value<JObject>("UnityIos");
if (info.Value<string>("Version") != App.AppVersion)
if (Utils.isUpdate(App.AppVersion, info.Value<string>("Version")))
{
Application.OpenURL(info.Value<string>("Url"));
Application.Quit();
@@ -24,6 +24,9 @@ public class WeChatController
private static extern void WechatLogin(string scope,string state);
[DllImport("__Internal")]
private static extern bool checkAPPIsExist(string URLScheme);
[DllImport("__Internal")]
private static extern bool checkLocation();
#endif
#endregion
/// <summary>
@@ -175,6 +178,12 @@ public class WeChatController
#endif
}
#if UNITY_IOS
public bool CheckLocation()
{
return checkLocation();
}
#endif
public void SendMessageToUnity(string gameObjectName, string UnityMethodName)
{
mainActivityClass.CallStatic("SendMessageToUnity",gameObjectName, UnityMethodName);